File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555# Install Required Packages for Script
5656apt update --allow-releaseinfo-change -y
5757
58- core_packages=" apt bash boxes cron coreutils curl dos2unix git gzip nano openssl pwgen sed software-properties-common tar tzdata unattended-upgrades unzip zip"
58+ core_packages=" apt bash boxes cron coreutils curl dos2unix git gzip nano needrestart openssl pwgen sed software-properties-common tar tzdata unattended-upgrades unzip zip"
5959
6060apt install -qy $core_packages || {
6161 echo " Error: Unable to install one or more packages. Exiting..."
@@ -71,7 +71,10 @@ for cmd in "${required_commands[@]}"; do
7171 fi
7272done
7373
74- sed -i " s/#\$ nrconf{restart} = 'i';/\$ nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf
74+ # Configure needrestart if available
75+ if [[ -f " /etc/needrestart/needrestart.conf" ]]; then
76+ sed -i " s/#\$ nrconf{restart} = 'i';/\$ nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf
77+ fi
7578
7679# Upgrade Software
7780apt upgrade -y
You can’t perform that action at this time.
0 commit comments