Modified rb to work without external vars
This commit is contained in:
commit
05c6a16b16
14
rb
Executable file
14
rb
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# . /usr/local/bin/vars
|
||||||
|
|
||||||
|
# Sample setup, change with your own
|
||||||
|
desk=(thonkpad desktop deskpi controller)
|
||||||
|
|
||||||
|
# Restart clients
|
||||||
|
for i in ${desk[*]:0:3} # 3 clients = first 3 array elements
|
||||||
|
do
|
||||||
|
rbc $i
|
||||||
|
done
|
||||||
|
# Restart server
|
||||||
|
rbs ${desk[3]} # server = 4th array element
|
12
rbc
Executable file
12
rbc
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
srv="controller" # insert your server's screen name here
|
||||||
|
bcmd="barrierc -f --no-tray --debug INFO --name $1 --enable-crypto $srv"
|
||||||
|
|
||||||
|
ssh $1 killall barrierc
|
||||||
|
if ssh $1 pidof barrierc &>/dev/null
|
||||||
|
then
|
||||||
|
ssh $1 killall -9 barrierc
|
||||||
|
fi
|
||||||
|
ssh $1 screen -dmS barrier $bcmd
|
||||||
|
ssh root@$1 renice -n -20 $(ssh $1 pidof barrierc)
|
12
rbs
Executable file
12
rbs
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
srv="controller" # insert your server hostname/ip here
|
||||||
|
bcmd="barriers -f --no-tray --debug INFO --name $srv --enable-crypto -c /etc/barrier.conf --address :24800"
|
||||||
|
|
||||||
|
ssh $1 killall barriers
|
||||||
|
if ssh $1 pidof -q barriers
|
||||||
|
then
|
||||||
|
ssh $1 killall -9 barriers
|
||||||
|
fi
|
||||||
|
ssh $1 screen -dmS barrier $bcmd
|
||||||
|
ssh root@$1 renice -n -20 $(ssh $1 pidof barriers)
|
Loading…
x
Reference in New Issue
Block a user