astroport/zen/cron_VRFY.sh

27 lines
970 B
Bash
Raw Normal View History

2020-04-19 11:30:03 +02:00
#!/bin/bash
########################################################################
# Author: Fred (support@qo-op.com)
# Version: 2020.03.21
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
########################################################################
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
echo '
########################################################################
# \\///
# qo-op
############# '$MY_PATH/$ME'
########################################################################
# ex: ./'$ME'
# VERIFY CRON for cron_MINUTE.sh and ACTIVATE it
########################################################################'
[[ $(crontab -l 2>&1 | grep "cron_MINUTE") ]] && exit 0
crontab -l > /tmp/mycron
echo "* * * * * $MY_PATH/cron_MINUTE.sh >> /tmp/astroport.log 2>&1" >> /tmp/mycron
crontab /tmp/mycron
rm /tmp/mycron
exit 0