You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
820 B
Bash
32 lines
820 B
Bash
#!/bin/sh
|
|
ffka_querfunk_mgmt=2a03:2260:a:b:ea94:f6ff:fea1:98f6
|
|
|
|
if ! ping6 -c1 $ffka_querfunk_mgmt &>/dev/null; then
|
|
echo 'ffka-querfunk is offline'
|
|
exit 1
|
|
fi
|
|
|
|
|
|
# stream setup
|
|
for i in zz_custom stream_proxy; do
|
|
scp assets/$i root@[$ffka_querfunk_mgmt]:/etc/init.d/
|
|
ssh root@$ffka_querfunk_mgmt "/etc/init.d/$i enable"
|
|
done
|
|
echo "0 * * * * pgrep socat || /etc/init.d/stream_proxy start" | ssh root@$ffka_querfunk_mgmt crontab -
|
|
|
|
# http://querfunk.ffka
|
|
echo FIXME scp assets/index.html root@[$ffka_querfunk_mgmt]:/lib/gluon/status-page/www/
|
|
|
|
|
|
echo "Tell ffka-querfunk to reboot"
|
|
ssh root@$ffka_querfunk_mgmt "reboot"
|
|
sleep 3
|
|
|
|
echo -n "Waiting for ffka-querfunk to come online after rebooting"
|
|
ffka_querfunk=2a03:2260:a:b::1:66
|
|
while ! ping6 -c1 $ffka_querfunk &>/dev/null; do
|
|
echo -n "."
|
|
sleep 1
|
|
done
|
|
echo ok
|