How to display reboot required user notification after installing a custom package in linux?
- by user284588
After installing a custom package I should force a reboot of the system.
I looked at couple of solutions to this
use notify-send to display user notification followed by a reboot command, which did work as planned. But the user notification is only shown when I install the package from command line and not when I installed through Software Center.
I came across some posts where they suggested adding the following to the postinst script
[ -x /usr/share/update-notifier/notify-reboot-required ] && \
/usr/share/update-notifier/notify-reboot-required || true
Tried including the above in the postinst script but all it does is updating the two files /var/run/reboot-required.pkgs and /var/run/reboot-required with restart information.
It neither displayed user-notification nor rebooted the system after package is installed.
Is there a way to display reboot required user notification in Ubuntu/Fedora/Open SUSE ?