1
0
mirror of https://github.com/namibia/demo-sync.git synced 2024-11-21 19:15:10 +00:00

fixed the missing active user value in the crontab command.

This commit is contained in:
Llewellyn van der Merwe 2020-03-06 15:51:47 +02:00
parent 3d18ad78b0
commit af466a23b5
No known key found for this signature in database
GPG Key ID: 8A8F406BA7238C4E

View File

@ -31,6 +31,7 @@ REPOURL="https://raw.githubusercontent.com/${OWNER}/${REPONAME}/master/"
############################################################## ##############################################################
Datetimenow=$(TZ=":ZULU" date +"%m/%d/%Y @ %R (UTC)" ) Datetimenow=$(TZ=":ZULU" date +"%m/%d/%Y @ %R (UTC)" )
SCRIPTURL="${REPOURL}$ACTION.sh" SCRIPTURL="${REPOURL}$ACTION.sh"
ACTIVEUSER=$(whoami)
HOMEPATH=~/ HOMEPATH=~/
BASENAME=".${ACTION}_${OWNER}" BASENAME=".${ACTION}_${OWNER}"
# set paths # set paths
@ -111,7 +112,7 @@ function setCron () {
echo "0 4 * * * curl -s $SCRIPTURL | bash" >> "${CRONPATH}" echo "0 4 * * * curl -s $SCRIPTURL | bash" >> "${CRONPATH}"
fi fi
# set the user cron # set the user cron
crontab -u $CLIENTUSER "${CRONPATH}" crontab -u $ACTIVEUSER "${CRONPATH}"
echo "Done" echo "Done"
fi fi
} }