Commit d41d5b4a by sokai

better upgrade (start the new script after upgrade) + cosmetic

parent 31b14b8f
Showing with 3 additions and 3 deletions
......@@ -56,7 +56,7 @@ start() {
CRONJOB="${UPDATEINTERVAL} * * * * ${SCRIPT} update # FreiFunkPotsdam-AccessPointsDataBase"
echo "${CRONJOB}" >> ${CRONTAB}
echo "${CRONTABUSER}" > ${CRONTABPATH}cron.update # reload crontab
logger -t ${SCRIPTNAME} "hourly update cron job for user ${CRONTABUSER} added (${SCRIPT} start)"
logger -t ${SCRIPTNAME} "update cron job (every ${UPDATEINTERVAL} minute past every hour) for user ${CRONTABUSER} added (${SCRIPT} start)"
update
fi
}
......@@ -115,8 +115,8 @@ upgrade() {
# install new script
chmod +x ${NEWSCRIPT}
mv ${NEWSCRIPT} ${SCRIPT}
enable
start
${SCRIPT} enable
${SCRIPT} start
VERSION=$(grep 'SCRIPTVERSION=' ${SCRIPT} -m 1 | cut -f2 -d'='|sed 's/ /%20/g'|sed "s/'//g")
SUCCESS="version (${VERSION}) installed at ${SCRIPT} (${SCRIPT} upgrade)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment