mirror of
https://github.com/namibia/demo-sync.git
synced 2024-11-22 03:25:09 +00:00
fixed the missing active user value in the crontab command.
This commit is contained in:
parent
3d18ad78b0
commit
af466a23b5
3
sync.sh
3
sync.sh
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user