Add scripts for Bitlair and DJO

This commit is contained in:
polyfloyd 2016-10-02 20:01:59 +02:00
parent 5b96a6be43
commit 239e6cec0e
27 changed files with 105 additions and 1 deletions

3
bitlair_closed.d/10_log Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
echo "Space closed on $(date)" >> /var/log/spacestate.log

3
bitlair_closed.d/10_mqtt Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
mqtt-simple -r -h mqtt.bitlair.nl -p 'bitlair/state' -m 'closed'

View file

@ -0,0 +1,7 @@
#!/bin/bash
# Switches off the led-board.
ssh root@bitpanel.bitlair.nl shutdown -h now
sleep 5
apc-switch 23 off
sleep 1

View file

@ -0,0 +1,11 @@
#!/bin/bash
ssh -o ConnectTimeout=1 root@music.bitlair.nl shutdown -h now
sleep 5
apc-switch 13 2
# Amplifier and KVM switch
apc-switch 20 2
sleep 1
mqtt-simple -r -h mqtt.bitlair.nl -p 'bitlair/music/space/state' -m 'stopped'

7
bitlair_closed.d/20_phone_off Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
# Switches off the phones.
poe-switch 1 2
sleep 1
poe-switch 2 2
sleep 1

View file

@ -0,0 +1,3 @@
#!/bin/bash
ssh -o ConnectTimeout=1 root@statsbak.bitlair.nl shutdown -h now

3
bitlair_closed.d/80_irc Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
irc-say "Bitlair is now closed"

View file

@ -0,0 +1,3 @@
#!/bin/bash
bitlair-tweet "We are closed."