Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Syncnode service
- Create a file:
- nano syncnode.sh
- and paste following:
- #!/bin/sh
- LOCK=/tmp/syncnode.lock
- if [ -f "$LOCK" ]; then
- echo "Already running..."
- exit 1
- fi
- touch "$LOCK"
- cd /FULL_PATH_TO_SCRIPT
- /usr/bin/python3 /FULL_PATH_TO_SCRIPT/syncnode.py YOUR_ADDRESS
- /usr/bin/python3 /FULL_PATH_TO_SCRIPT/xenminer/index_builder.py
- rm "$LOCK"
- exit 0
- Make syncnode.sh executable:
- chmod +x syncnode.sh
- Create a cron job to run this script every 5 minutes
- Run crontab -e and paste the following
- */5 * * * * /FULL_PATH_TO_SCRIPT/syncnode.sh
- The syncnode.lock file will prevent the python scripts from running multiple times at the same time.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement