What if ran as root?
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# if started as root
|
||||
if [ $UID -eq 0 ]
|
||||
then
|
||||
find /data \! -user executor -exec chown executor:executor {} \;
|
||||
su executor -c cron-command
|
||||
exit $?
|
||||
fi
|
||||
# check lock
|
||||
lock=/var/run/cloner.pid
|
||||
|
||||
|
||||
Reference in New Issue
Block a user