Last active
March 14, 2024 09:19
-
-
Save mikebratt/37326cce837c7825737cd77cc6e7c117 to your computer and use it in GitHub Desktop.
needrestart settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -f "/etc/needrestart/needrestart.conf" ]]; then | |
# Disable "Pending kernel upgrade" prompt | |
sudo sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf | |
# Set Restart mode to automatic | |
sudo sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment