• 0
Special K

cronjob

Question

Hi, what is the current approach to installing a cronjob for an ALQO MN?

 

If anyone has a script to share, I would be more than happy if you could share it.

 

Thanks and cheers, Special K

Share this post


Link to post
Share on other sites

5 answers to this question

  • 1
21 hours ago, Special K said:

Hi, what is the current approach to installing a cronjob for an ALQO MN?

 

If anyone has a script to share, I would be more than happy if you could share it.

 

Thanks and cheers, Special K

 

1. Shell script that restarts the masternode if not running and logs the result in the logfile
 /var/log/alqod_log.txt

Create the empty file 
mn-check-run.sh in /root/ALQO/
Insert following code:

#!/bin/sh
# Check for ALQO MN running and restart if not

case "$(pidof alqod | wc -w)" in
0)  echo "Restarting alqod:     $(date --utc)" >> /var/log/alqod_log.txt
    /root/ALQO/alqod &
    ;;
1)  # all ok
    echo "$(date --utc) alqod already running" >> /var/log/alqod_log.txt
    ;;
*)  echo "Attention - multiple instances of ALQO daemon running  $(date --utc)" >> /var/log/alqod_log.txt
    ;;
esac


2. Make it executable. 
Type in the command line in the VPS: 

chmod 777 /root/ALQO/mn-check-run.sh


3. Create a cronjob which runs the newly created shell script every 10 Minutes

Type in the command line on the VPS:

crontab –e


Select the editor of your choice
Insert following line in the file and save it afterwards

*/10 * * * * /root/ALQO/mn-check-run.sh

 

And that’s it now you have a script that checks every 10 minutes the state of the alqod and restarts it if its not running anymore – I delete the logging of the “running daemon” in the script once I have confirmed that everything is correct. That’s just for the start. In the end I have only the logs of the restarts and the highly unlikely case that more than one daemon is running.

 

made by our awesome smasher! I‘ll create a guide out of this soon.

 

EDIT: Available here now (better layout): https://hub.alqo.app/topic/16-masternode-vps-setup-guide/?do=findComment&comment=76

 

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, fhoenyx said:

The Kalkulus HUB is one of the simplest ways to do it. You can get some KLKS pretty easily on CryptoBridge to pay the fees. There's a 15% discount on fees until Oct 15th. 

https://hub.kalkul.us/en/masternodes

This seems like an ad to me, that is not really welcomed here, since it’s not an answer to his specific question.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.