1
0
mirror of https://github.com/namibia/demo-sync.git synced 2024-11-24 20:27:33 +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)" )
SCRIPTURL="${REPOURL}$ACTION.sh"
ACTIVEUSER=$(whoami)
HOMEPATH=~/
BASENAME=".${ACTION}_${OWNER}"
# set paths
@ -111,7 +112,7 @@ function setCron () {
echo "0 4 * * * curl -s $SCRIPTURL | bash" >> "${CRONPATH}"
fi
# set the user cron
crontab -u $CLIENTUSER "${CRONPATH}"
crontab -u $ACTIVEUSER "${CRONPATH}"
echo "Done"
fi
}