diff --git a/restart-hushd.sh b/restart-hushd.sh new file mode 100644 index 0000000..54910da --- /dev/null +++ b/restart-hushd.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Stops and restarts hushd to avoid stupid bugs + +# if hushd is not running, start it +#set -e + +DIR="$HOME/git/hush3/src" +CLI="$DIR/hush-cli" +HUSHD="$DIR/hushd" + +echo "Stopping hushd if it is running..." +$CLI stop + +# TODO: look for lockfile +# testing +#sleep 5 + +# prod +sleep 30 + +# save some logs for now to debug +cp $DIR/hush.log $DIR/hush.log.prev-$$ + +# restart hushd +cd $DIR +$HUSHD &> hush.log & \ No newline at end of file