This commit is contained in:
buanet
2023-04-16 15:16:37 +02:00
parent e283d25710
commit 8fe4d775f5
2 changed files with 2 additions and 8 deletions

View File

@@ -146,6 +146,7 @@ if [[ -f /opt/.first_run ]]; then
# echo "$packages" > /opt/scripts/.docker_config/.packages
bash /opt/scripts/setup_packages.sh -install
fi
echo ' '
# Register maintenance script
echo -n 'Registering maintenance script as command... '
echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc

View File

@@ -43,21 +43,14 @@ if [[ "$1" == "-install" ]]; then
if [[ "$(dpkg-query -W -f='${Status}' "$i" 2>/dev/null | grep -c "ok installed")" -eq 0 ]]; then
echo -n "$i is not installed. Installing... "
check_package_preq >> /opt/scripts/setup_packages.log 2>&1
apt-get -q -y install "$i" >> /opt/scripts/setup_packages.log 2>&1
return=$?
if [[ "$return" -ne 0 ]]; then
echo "Failed."
echo "For more details see \"/opt/scripts/setup_packages.log\"."
echo ' '
else
DEBIAN_FRONTEND=noninteractive apt-get -q -y install "$i" >> /opt/scripts/setup_packages.log 2>&1
return1=$?
if [[ "$return1" -ne 0 ]]; then
echo "Failed."
echo "For more details see \"/opt/scripts/setup_packages.log\"."
echo ' '
else
echo "Done."
fi
fi
else
echo "$i is already installed."