startpower and config separation

This commit is contained in:
2018-02-19 21:19:38 +01:00
parent ca716802d8
commit c27e242007
5 changed files with 72 additions and 39 deletions

View File

@@ -1,21 +1,4 @@
#!/bin/sh
OUT1=1
OUT2=2
OUT3=3
OUT4=7
OUT5=8
OUT6=9
OUT7=11
OUT8=12
for n in $(seq 1 8) ; do
eval "echo \$OUT$n > /sys/class/gpio/export"
eval "echo out > /sys/class/gpio/gpio\$OUT$n/direction"
# 0=on 1=off :)
VAL=0
eval "echo $VAL > /sys/class/gpio/gpio\$OUT$n/value"
sleep 0.2
done
/usr/bin/openpdu initboards
/usr/bin/openpdu initoutlets

29
etc/openpdu/outlets.conf Normal file
View File

@@ -0,0 +1,29 @@
[DEFAULT]
description = Generic outlet
startpower = 1
# [outlet0]
# board = 0
# channel = 0
# description = Router
# [outlet1]
# board = 0
# channel = 1
# description = NAS
# [outlet2]
# board = 1
# channel = 0
# description = Switch
# [outlet3]
# board=1
# channel=1
# description = MailServer
# [outlet4]
# board=1
# channel=2
# description = Extra Fan
# startpower = 0