trypbm.sh
changeset 44 1983a3cc0647
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/trypbm.sh	Wed Mar 08 12:34:34 2017 +0000
@@ -0,0 +1,21 @@
+#! /bin/bash
+
+# script to locally try out a rebuilt pbm with same
+# settins as used in pbm (usually run from /etc/init.d)
+
+set -x
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+DESC="power manager daemon test"
+NAME=pbmd
+DAEMON=./$NAME
+# to set the node to sleep from 22:00 to 06:00 use this
+DAEMON_ARGS="/var/log/battery.log /var/log/battery-snapshot.log /etc/bootflag 60 ABS 22 6"
+# to set the node to sleep from 14:10 to 16:45 use this
+# DAEMON_ARGS="/var/log/battery.log /var/log/battery-snapshot.log /etc/bootflag 60 ABS 14 10 16 45"
+# to set the node to sleep for 10 minutes of every 30 use this
+# DAEMON_ARGS="/var/log/battery.log /var/log/battery-snapshot.log /etc/bootflag 60 REL 30 10"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+$DAEMON $DAEMON_ARGS