upgrades: Prompt to restart services/system when needed
The "needrestart" package can show if any services should be restarted after package upgrades, and can restart those services. It can also report if the system should be restarted to use a new kernel.
This issue is nominated for Contributor Invite:
- Task Area: Coding
- Effort Rating: 3/5
- Skills Required: Python, Django
-
Periodically check if any service or the system needs to be restarted. - Run
needrestart -bin an action to get services that need restart and current/expected kernel version. - Use
plinth.glib.scheduleto schedule the check to run once per day.
- Run
-
When restart is needed, create a notification for the user, and show the list of services to be restarted (if not the system).Useplinth.notification.Notificationto create the notification.- Decided that notification is not needed for now.
-
Provide action(s) in the notification for the user to perform the restart of services or system. -
Automatically restart services or system when needed. - Before allowing system restart, perform some basic checks such as ensuring that an install or update is not in progress.
- System restart handling may be placed in the power module.
Edited by James Valleroy