Update supernode
This commit is contained in:
parent
8b479fa9bf
commit
c525ccc8f3
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
help () {
|
||||
echo "Supernode Settings:"
|
||||
echo "status | off | loadbalance"
|
||||
echo "status | off | on | loadbalance_on | loadbalance_off | auto"
|
||||
}
|
||||
|
||||
status () {
|
||||
@ -36,17 +36,19 @@ on () {
|
||||
echo "Supernode Aktiviert"
|
||||
}
|
||||
|
||||
loadbalance () {
|
||||
loadbalancing=$(cat /etc/supernode-status/loadbalancing.mode)
|
||||
if ! [ -f /etc/supernode-status/loadbalancing.mode ]; then
|
||||
echo 0 > /etc/supernode-status/loadbalancing.mode
|
||||
fi
|
||||
if [ $loadbalancing == 0 ]; then
|
||||
loadbalance_on () {
|
||||
echo 1 > /etc/supernode-status/loadbalancing.mode
|
||||
else
|
||||
echo "Loadbalance on"
|
||||
}
|
||||
|
||||
loadbalance_off () {
|
||||
echo 0 > /etc/supernode-status/loadbalancing.mode
|
||||
fi
|
||||
sleep 5
|
||||
status
|
||||
echo "Loadbalance off"
|
||||
}
|
||||
|
||||
auto () {
|
||||
echo 1 > /etc/supernode-status/loadbalancing.mode
|
||||
echo 1 > /etc/supernode-status/supernode.mode
|
||||
echo "Supernode Aktiviert inkl. Loadbalance"
|
||||
}
|
||||
$1
|
||||
|
Loading…
Reference in New Issue
Block a user