diff options
author | James Meyer <james.meyer@operamail.com> | 2012-11-01 20:51:19 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-11-01 20:51:19 (GMT) |
commit | 3202a396e855bfcc02a639d9b9cefd6bc44f1c40 (patch) | |
tree | a495b1d2116d9f97d3b627b45fee91decfce7e8d /abs/core/runit-scripts | |
parent | 1563ce5b39f113386cc32140754dfa4eafa1a597 (diff) | |
download | linhes_pkgbuild-3202a396e855bfcc02a639d9b9cefd6bc44f1c40.zip linhes_pkgbuild-3202a396e855bfcc02a639d9b9cefd6bc44f1c40.tar.gz linhes_pkgbuild-3202a396e855bfcc02a639d9b9cefd6bc44f1c40.tar.bz2 |
runit-scripts: added zoneminder
Added some svwait mysql for mythbackend and zoneminder
added myth_run_status=1 for all other scripts that use /etc/profile
refs #857
Diffstat (limited to 'abs/core/runit-scripts')
10 files changed, 43 insertions, 10 deletions
diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD index 83530fe..17280f9 100755 --- a/abs/core/runit-scripts/PKGBUILD +++ b/abs/core/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts pkgver=2.1.1 -pkgrel=78 +pkgrel=82 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license="BSD" diff --git a/abs/core/runit-scripts/runitscripts/services/Xvfb/run b/abs/core/runit-scripts/runitscripts/services/Xvfb/run index 71ffedd..b45b4ae 100755 --- a/abs/core/runit-scripts/runitscripts/services/Xvfb/run +++ b/abs/core/runit-scripts/runitscripts/services/Xvfb/run @@ -1,4 +1,5 @@ #!/bin/bash +MYTH_RUN_STATUS="1" . /etc/profile export TERM=linux . /etc/rc.conf diff --git a/abs/core/runit-scripts/runitscripts/services/acpid/run b/abs/core/runit-scripts/runitscripts/services/acpid/run index bffb564..808808f 100755 --- a/abs/core/runit-scripts/runitscripts/services/acpid/run +++ b/abs/core/runit-scripts/runitscripts/services/acpid/run @@ -3,5 +3,6 @@ exec 2>&1 export TERM=linux . /etc/rc.conf . /etc/rc.d/functions +svwaitup -s 10 /service/rsyslog stat_runit "Starting acpid" -exec /usr/sbin/acpid -f -c /etc/acpi/events +exec /usr/sbin/acpid -f -l -c /etc/acpi/events diff --git a/abs/core/runit-scripts/runitscripts/services/evrouter/run b/abs/core/runit-scripts/runitscripts/services/evrouter/run index 56f7ae6..7d9e1d2 100755 --- a/abs/core/runit-scripts/runitscripts/services/evrouter/run +++ b/abs/core/runit-scripts/runitscripts/services/evrouter/run @@ -1,4 +1,5 @@ #!/bin/bash +MYTH_RUN_STATUS="1" . /etc/profile export TERM=linux . /etc/rc.conf diff --git a/abs/core/runit-scripts/runitscripts/services/msg_daemon/run b/abs/core/runit-scripts/runitscripts/services/msg_daemon/run index f789d0b..76bb702 100755 --- a/abs/core/runit-scripts/runitscripts/services/msg_daemon/run +++ b/abs/core/runit-scripts/runitscripts/services/msg_daemon/run @@ -1,4 +1,5 @@ #!/bin/sh +MYTH_RUN_STATUS="1" export TERM=linux . /etc/rc.conf . /etc/rc.d/functions diff --git a/abs/core/runit-scripts/runitscripts/services/mysql/run b/abs/core/runit-scripts/runitscripts/services/mysql/run index f078c87..de76962 100755 --- a/abs/core/runit-scripts/runitscripts/services/mysql/run +++ b/abs/core/runit-scripts/runitscripts/services/mysql/run @@ -41,4 +41,5 @@ MYSQLADMIN='/usr/bin/mysqladmin' trap "$MYSQLADMIN shutdown" 0 trap 'exit 2' 1 2 3 15 -/usr/bin/mysqld_safe --user=mysql & wait +/usr/bin/mysqld_safe --user=mysql >/dev/null 2>/dev/null & wait + diff --git a/abs/core/runit-scripts/runitscripts/services/mythbackend/run b/abs/core/runit-scripts/runitscripts/services/mythbackend/run index 937b267..152beb4 100755 --- a/abs/core/runit-scripts/runitscripts/services/mythbackend/run +++ b/abs/core/runit-scripts/runitscripts/services/mythbackend/run @@ -5,7 +5,7 @@ export TERM=linux . /etc/rc.conf . /etc/rc.d/functions #wait for mysql -/sbin/svwaitup -s 5 /service/mysql +/sbin/svwaitup -s 10 /service/mysql #profile is here to setup LC_ALL/locale MYTH_RUN_STATUS="1" @@ -34,11 +34,6 @@ fi stat_runit "Starting MythBackend" export HOME=/root -if [ ! x$SystemType = xSlave_backend ] -then - sv start mysql > /dev/null 2>/dev/null -fi -#echo "Starting mythbackend" # if [ -f /tmp/debug ] # then # echo "using gbd/debug" diff --git a/abs/core/runit-scripts/runitscripts/services/ntpd/run b/abs/core/runit-scripts/runitscripts/services/ntpd/run index 146c4e0..ce1ff12 100755 --- a/abs/core/runit-scripts/runitscripts/services/ntpd/run +++ b/abs/core/runit-scripts/runitscripts/services/ntpd/run @@ -5,6 +5,6 @@ export TERM=linux stat_runit "Starting NTPD" printhl " Fetching time" msg=`/usr/bin/ntpdate pool.ntp.org ` -printhl " $msg" +#printhl " $msg" exec /usr/bin/ntpd -n -p /var/run/ntpd.pid 2>/dev/null diff --git a/abs/core/runit-scripts/runitscripts/services/zoneminder/finish b/abs/core/runit-scripts/runitscripts/services/zoneminder/finish new file mode 100755 index 0000000..dbc311f --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/zoneminder/finish @@ -0,0 +1,5 @@ +#!/bin/bash +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions +/usr/bin/zmpkg.pl stop diff --git a/abs/core/runit-scripts/runitscripts/services/zoneminder/run b/abs/core/runit-scripts/runitscripts/services/zoneminder/run new file mode 100755 index 0000000..dfd15f3 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/zoneminder/run @@ -0,0 +1,28 @@ +#!/bin/bash +exec 2>&1 + +export TERM=linux +MYTH_RUN_STATUS="1" +. /etc/rc.conf +. /etc/rc.d/functions +#wait for mysql +/sbin/svwaitup -s 20 /service/mysql + +stat_runit "Starting ZoneMinder" +/usr/bin/zmpkg.pl start 2>/tmp/zoneminder.out +rc=$? +if [ $rc = 0 ] +then + PID=`pidof -x zmdc.pl` + while [[ -d /proc/$PID ]] + do + sleep 45 + done +else + stat_runit "Zoneminder did not start correctly" +fi + + + + + |