Add Snap fullnode daemon

This commit is contained in:
Michael Vines
2018-06-24 10:10:55 -07:00
parent ed6ba55261
commit ce361c2cdc
12 changed files with 340 additions and 73 deletions

30
snap/hooks/configure vendored Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash -e
echo Stopping daemons
snapctl stop --disable solana.daemon-drone
snapctl stop --disable solana.daemon-leader
snapctl stop --disable solana.daemon-validator
mode="$(snapctl get mode)"
if [[ -z "$mode" ]]; then
exit 0
fi
$SNAP/bin/setup.sh "$(snapctl get num-tokens)"
case $mode in
leader+drone)
snapctl start --enable solana.daemon-leader
snapctl start --enable solana.daemon-drone
;;
leader)
snapctl start --enable solana.daemon-leader
;;
validator)
snapctl start --enable solana.daemon-validator
;;
*)
echo "Error: Unknown mode: $mode"
exit 1
;;
esac