Update pialert-install.sh

test
This commit is contained in:
tteckster 2023-09-17 22:54:31 -04:00 committed by GitHub
parent 3fd4a50078
commit 35701cb845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -72,7 +72,9 @@ done
git config --global --add safe.directory /opt/pialert git config --global --add safe.directory /opt/pialert
sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf
sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron sed -i 's/~/\/opt/g' /opt/pialert/install/pialert.cron
set +e
(crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab - (crontab -l 2>/dev/null; cat /opt/pialert/install/pialert.cron) | crontab -
set -e
cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update cp -R /opt/pialert/install/pialert_update.sh /usr/bin/update
sed -i 's/~/\/opt/g' /usr/bin/update sed -i 's/~/\/opt/g' /usr/bin/update
chmod +x /usr/bin/update chmod +x /usr/bin/update