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