linux - rename cron

This commit is contained in:
bunkerity
2021-08-18 17:46:28 +02:00
parent fd52bb7c8d
commit a824e15684
4 changed files with 5 additions and 13 deletions

View File

@@ -891,7 +891,7 @@ if [ "$OS" = "alpine" ] ; then
CRON_PATH="/etc/crontabs/nginx"
else
CRON_SRC="/tmp/bunkerized-nginx/misc/cron-linux"
CRON_PATH="/etc/cron.d/nginx"
CRON_PATH="/etc/cron.d/bunkerized-nginx"
fi
do_and_check_cmd cp "$CRON_SRC" "$CRON_PATH"
do_and_check_cmd chown root:nginx "$CRON_PATH"

View File

@@ -64,16 +64,7 @@ sed -i "s@nginx ALL=(root:root) NOPASSWD: /opt/bunkerized-nginx/ui/linux.sh@@" /
# Remove cron
echo "[*] Remove cron"
if [ "$OS" = "debian" ] || [ "$OS" = "ubuntu" ] ; then
CRON_PATH="/var/spool/cron/crontabs/nginx"
elif [ "$OS" = "centos" ] ; then
CRON_PATH="/var/spool/cron/nginx"
elif [ "$OS" = "alpine" ] ; then
CRON_PATH="/etc/crontabs/nginx"
fi
if [ -e "$CRON_PATH" ] ; then
do_and_check_cmd rm -f "$CRON_PATH"
fi
do_and_check_cmd rm -f /etc/crond.d/bunkerized-nginx
# Remove /opt/bunkerized-nginx
if [ -e "/opt/bunkerized-nginx" ] ; then