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
1 changed files with 2 additions and 1 deletions

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
}