Change cron to execute as root
This commit is contained in:
parent
785f4c8d75
commit
4f7efa5a25
|
@ -45,7 +45,8 @@ if [ "$1" = 'cron' ] || [ "$1" = '/opt/save-attachments.sh' ]; then
|
|||
fi
|
||||
|
||||
if [ "$1" = 'cron' ]; then
|
||||
exec /usr/sbin/cron && tail -f /var/mail/save-attachments.log
|
||||
else
|
||||
exec "$@"
|
||||
/usr/sbin/cron && tail -f /var/mail/save-attachments.log
|
||||
exit $?
|
||||
fi
|
||||
|
||||
exec $@
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
*/5 * * * * mail /opt/save-attachments.sh >> /var/mail/save-attachments.log 2>&1
|
||||
*/5 * * * * root /opt/save-attachments.sh >> /var/mail/save-attachments.log 2>&1
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user