From def8040230b359660191281832e0e44e46da08ca Mon Sep 17 00:00:00 2001 From: simono41 Date: Mon, 5 Aug 2019 13:32:42 +0200 Subject: [PATCH] server_optimize --- server_optimize.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 server_optimize.sh diff --git a/server_optimize.sh b/server_optimize.sh old mode 100644 new mode 100755 index a7bc781..17bbf35 --- a/server_optimize.sh +++ b/server_optimize.sh @@ -94,15 +94,15 @@ function dailyupdates() { apt install fcron -y - echo "#!/bin/bash" >> /etc/cron.daily/update-packages + echo "#!/bin/bash" > /etc/cron.daily/update-packages echo -n "apt update && apt upgrade -y" >> /etc/cron.daily/update-packages - echo "ROOT" >> ${mountpoint}/etc/cron.daily/update-packages - echo "EXITVALUE=\$?" >> ${mountpoint}/etc/cron.daily/update-packages - echo "if [ \$EXITVALUE != 0 ]; then" >> ${mountpoint}/etc/cron.daily/update-packages + echo "ROOT" >> /etc/cron.daily/update-packages + echo "EXITVALUE=\$?" >> /etc/cron.daily/update-packages + echo "if [ \$EXITVALUE != 0 ]; then" >> $/etc/cron.daily/update-packages echo " /usr/bin/logger -t update-packages \"ALERT exited abnormally with [\$EXITVALUE]\"" >> /etc/cron.daily/update-packages - echo "fi" >> ${mountpoint}/etc/cron.daily/update-packages - echo "exit \$EXITVALUE" >> ${mountpoint}/etc/cron.daily/update-packages - chmod +x ${mountpoint}/etc/cron.daily/update-packages + echo "fi" >> /etc/cron.daily/update-packages + echo "exit \$EXITVALUE" >> /etc/cron.daily/update-packages + chmod +x /etc/cron.daily/update-packages }