31 lines
1.0 KiB
Bash
Executable File
31 lines
1.0 KiB
Bash
Executable File
#!/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
|
|
|
|
# MAKE IPFS SWARM refresh
|
|
$MY_PATH/ipfs_SWARM_refresh.sh
|
|
|
|
exit 0
|