Fixed crontab
This commit is contained in:
parent
a8798d475c
commit
449f5e7d4c
@ -37,10 +37,12 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|||||||
# m h dom mon dow user command
|
# m h dom mon dow user command
|
||||||
${CRON_SCHEDULE} /usr/sbin/autopostgresqlbackup
|
${CRON_SCHEDULE} /usr/sbin/autopostgresqlbackup
|
||||||
EOF
|
EOF
|
||||||
|
crontab /etc/crontab
|
||||||
else
|
else
|
||||||
echo "Using cron.daily schedule..."
|
echo "Using cron.daily schedule..."
|
||||||
|
echo -e "#!/bin/bash\n/usr/sbin/autopostgresqlbackup" > /etc/periodic/daily/backup.sh
|
||||||
|
chmod +x /etc/periodic/daily/backup.sh
|
||||||
fi
|
fi
|
||||||
crontab /etc/crontab
|
|
||||||
|
|
||||||
# Create the file
|
# Create the file
|
||||||
echo "Creating the password file..."
|
echo "Creating the password file..."
|
||||||
@ -53,4 +55,4 @@ chmod 0600 ${HOME}/.pgpass
|
|||||||
|
|
||||||
# Execute cron with parameters (autopostgresql script is under /etc/cron.daily)
|
# Execute cron with parameters (autopostgresql script is under /etc/cron.daily)
|
||||||
echo "Execute cron service..."
|
echo "Execute cron service..."
|
||||||
exec cron -f -l ${CRON_LOG_LEVEL:-8}
|
exec crond -f -l ${CRON_LOG_LEVEL:-8}
|
Loading…
Reference in New Issue
Block a user