Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4439

How do I prevent the pop-up: "Daemons using outdated libraries""Which services should be restarted?"

$
0
0

I want to automatically restart them. This script does not work:

FILE_PATH="/etc/needrestart/needrestart.conf"# Check if the file existsif [ -f "$FILE_PATH" ]; then    # Use sed to replace 'i' with 'a' for the specific configuration    sudo sed -i "s/\$nrconf{restart} = 'i';/\$nrconf{restart} = 'a';/g" "$FILE_PATH"    echo "The file has been updated successfully."else    echo "The specified file does not exist."fi

I have seen the closed StackOverflow post on this topic. I also tried echo '* libraries/restart-without-asking boolean true' | sudo debconf-set-selections with no change in behavior.

Before running the script, /etc/needrestart/needrestart.conf had a line with this: $nrconf{restart} = 'i';, and after running the script, the line changed to this: $nrconf{restart} = 'a';. This did not change the popup behavior.


Viewing all articles
Browse latest Browse all 4439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>