2014-01-04-0503Z


I believe I finally have this working right. after finding out that the cryptocoin daemons make Skype calls too choppy, I've been fine-tuning this for a few days:

jcomeau@aspire:~$ cat $(which start_stop_coin_daemons.sh)
#!/bin/bash -x
if [ -z "$1" -a "$(pidof skype)" ]; then
 action=stop
elif [ "$1" ]; then
 action=$1
else
 action=start
fi
if [ "$action" = "stop" ]; then
 check=
else
 action=
 check=-z
fi
for daemon in $(ls ~/bin/*coind); do
 if [ $check "$(pidof $(basename $daemon))" ]; then
  $daemon $action &
 fi
done
jcomeau@aspire:~$ crontab -l
* * * * * ~/bin/start_stop_coin_daemons.sh

for it to work, all the *coind binaries you want running, or symlinks to them, must be in $HOME/bin.

Back to blog or home page

last updated 2014-01-04 00:06:34. served from tektonic.jcomeau.com