summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-02-19 21:10:18 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-02-19 21:10:18 (GMT)
commit2648e999d277eac5c3d331a3609bcc73fafbea71 (patch)
tree40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/core/runit-scripts
parentc759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff)
parent7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff)
downloadlinhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip
linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz
linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2
Merge branch 'testing'
# By James Meyer (1091) and others # Via James Meyer (5) and others * testing: (1148 commits) LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables. xf86-video-ati: xorg ati driver. LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE. LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop. e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers. LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902 zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900 iguanair: rebuild with python 2.7 LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first. linhes-udev-rules: add rules for mce,streamzap,serial lirc devices. mythinstall: recompile for matching libs mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/ ...
Diffstat (limited to 'abs/core/runit-scripts')
-rwxr-xr-xabs/core/runit-scripts/PKGBUILD6
-rwxr-xr-xabs/core/runit-scripts/runitscripts/127
-rwxr-xr-xabs/core/runit-scripts/runitscripts/316
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/Xvfb/run1
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/acpid/run3
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/cetonproxy/finish2
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/cetonproxy/run25
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/cron/log/run5
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/cron/run2
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/dbus/run4
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/evrouter/run1
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/fah/finish16
-rw-r--r--abs/core/runit-scripts/runitscripts/services/fah/run27
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/log/run2
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/run4
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/igdaemon/log/run7
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/igdaemon/run2
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/infinitv_usb/log/run7
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/infinitv_usb/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/lighttpd/run15
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/msg_daemon/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mysql/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythbackend/run59
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythexpress/log/run7
-rw-r--r--abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/lock0
-rw-r--r--abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/pid1
-rw-r--r--abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/stat1
-rw-r--r--abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/statusbin0 -> 20 bytes
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythexpress/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythzmserver/log/run5
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythzmserver/run11
-rw-r--r--abs/core/runit-scripts/runitscripts/services/ncid-server/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/ntpd/finish7
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/ntpd/run2
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/remotes/run138
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/remyth/log/run7
-rw-r--r--abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/lock0
-rw-r--r--abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/pid1
-rw-r--r--abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/stat1
-rw-r--r--abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/statusbin0 -> 20 bytes
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/remyth/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/supplemental-slave/run11
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/udevil/log/run8
-rw-r--r--abs/core/runit-scripts/runitscripts/services/udevil/run6
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/vnc/finish14
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/vnc/run15
-rw-r--r--abs/core/runit-scripts/runitscripts/services/xymon-client/run2
-rw-r--r--abs/core/runit-scripts/runitscripts/services/xymon-server/run2
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/zoneminder/finish5
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/zoneminder/run28
50 files changed, 494 insertions, 63 deletions
diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD
index 9e73603..1f1b02f 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=66
+pkgver=8.0
+pkgrel=1
pkgdesc="collection of startup scripts for runit"
url="http://smarden.org/runit/"
license="BSD"
@@ -11,7 +11,7 @@ replaces=()
backup=('etc/runit/1.local' 'etc/runit/3.local')
install=runit.install
source=(fbsplash-runit.sh)
-arch=('i686')
+arch=('i686' 'x86_64')
build() {
rsync -a --exclude=.svn --exclude=*~ $startdir/runitscripts $startdir/src
diff --git a/abs/core/runit-scripts/runitscripts/1 b/abs/core/runit-scripts/runitscripts/1
index a45fc16..9463e60 100755
--- a/abs/core/runit-scripts/runitscripts/1
+++ b/abs/core/runit-scripts/runitscripts/1
@@ -2,14 +2,18 @@
/etc/rc.sysinit
. /etc/rc.conf
. /etc/rc.d/functions
-hostname `cat /etc/hostname`
+#no longer needed rc.sysinit takes care of the hostname
+#hostname `cat /etc/hostname`
/sbin/sysctl -p 2>/dev/null >/dev/null
#make sure permissions are right for /etc/systemconfig
-/usr/bin/setfacl -m u:mythtv:rw- /etc/systemconfig > /dev/null
+chown root:mythtv /etc/systemconfig
+chmod 774 /etc/systemconfig
+/usr/bin/setfacl -m u:mythtv:rw- /etc/systemconfig 2>/dev/null >/dev/null
+
#yes it's needed the 2nd time
/usr/LH/bin/load-modules-mythvantage.sh >/dev/null
rm /etc/dhcpc/dhcpcd*.pid 2>/dev/null
-rm -f /etc/sv/frontend/.runtime/* 2>/dev/null
+rm -f /service/frontend/.runtime/* 2>/dev/null
rm -f /etc/runit/reboot 2>/dev/null
/sbin/agetty -8 38400 tty10 linux &
stat_busy "Starting network"
@@ -19,6 +23,14 @@ stat_done
/usr/sbin/ethtool -s eth0 wol g 2>/dev/null
/usr/sbin/ethtool -s eth1 wol g 2>/dev/null
/usr/sbin/ethtool -s eth2 wol g 2>/dev/null
+#cleanup of log files
+if [ -f /etc/cron.daily/log_care ]
+then
+ stat_busy "Cleaning up old logs"
+ /etc/cron.daily/log_care 2>/dev/null >/dev/null &
+ stat_done
+fi
+
#user added stuff for level 1 of runit
if [ -e /etc/runit/1.local ]
then
@@ -27,4 +39,13 @@ then
/etc/runit/1.local
stat_done
fi
+#some stuff from rc.multi
+run_hook multi_start
+# Load sysctl config files
+/usr/lib/systemd/systemd-sysctl
+# Load additional binary formats
+mountpoint -q /proc/sys/fs/binfmt_misc || mount /proc/sys/fs/binfmt_misc &>/dev/null || mount -t binfmt_misc binfmt /proc/sys/fs/binfmt_misc
+/usr/lib/systemd/systemd-binfmt
+bootlogd_stop
+rm -f /run/nologin
diff --git a/abs/core/runit-scripts/runitscripts/3 b/abs/core/runit-scripts/runitscripts/3
index 15e4c5f..1a4b384 100755
--- a/abs/core/runit-scripts/runitscripts/3
+++ b/abs/core/runit-scripts/runitscripts/3
@@ -1,18 +1,13 @@
#!/bin/sh
-
+clear
. /etc/rc.conf
. /etc/rc.d/functions
-
-echo "======================================================================"
for i in `seq 3`
do
- echo " " > /dev/tty1
+echo " " > /dev/tty1
done
-if [ -f /lib/splash/cache/daemon.pid ]
-then
- pid=`cat /lib/splash/cache/daemon.pid`
- kill -9 $pid 2>/dev/null
-fi
+echo "======================================================================"
+
export PREVLEVEL=3
#user added stuff for level 3 of runit
@@ -23,5 +18,8 @@ then
/etc/runit/3.local
stat_done
fi
+/usr/sbin/ethtool -s eth0 wol g 2>/dev/null
+/usr/sbin/ethtool -s eth1 wol g 2>/dev/null
+/usr/sbin/ethtool -s eth2 wol g 2>/dev/null
/etc/rc.shutdown
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/cetonproxy/finish b/abs/core/runit-scripts/runitscripts/services/cetonproxy/finish
new file mode 100755
index 0000000..4d4d6da
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/cetonproxy/finish
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/killall -9 balance
diff --git a/abs/core/runit-scripts/runitscripts/services/cetonproxy/run b/abs/core/runit-scripts/runitscripts/services/cetonproxy/run
new file mode 100755
index 0000000..c8c7fcf
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/cetonproxy/run
@@ -0,0 +1,25 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Ceton bridge"
+pid_string=''
+
+for i in `ls /etc/ceton_proxy.d/|sort -r`
+do
+ . /etc/ceton_proxy.d/$i
+ #forcing foreground and then running with & is to capture the pid
+ balance -f $port $ip:80 >/dev/null &
+ stat_runit " proxy $ip on port $port"
+ pid=$!
+ pid_string="$pid_string $pid"
+done
+
+if [ "x$pid_string" = "x" ]
+then
+ sv stop cetonproxy
+else
+ wait $pid_string
+fi
+
diff --git a/abs/core/runit-scripts/runitscripts/services/cron/log/run b/abs/core/runit-scripts/runitscripts/services/cron/log/run
new file mode 100755
index 0000000..9dd37e3
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/cron/log/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 2>&1
+. /etc/systemconfig
+ /usr/bin/logger -p local6.info -t cron
+
diff --git a/abs/core/runit-scripts/runitscripts/services/cron/run b/abs/core/runit-scripts/runitscripts/services/cron/run
index 0894236..3d358d3 100755
--- a/abs/core/runit-scripts/runitscripts/services/cron/run
+++ b/abs/core/runit-scripts/runitscripts/services/cron/run
@@ -6,4 +6,4 @@ stat_runit "Starting Cron"
exec 2>&1
-exec /usr/sbin/crond -f >/dev/null 2>/dev/null
+exec /usr/sbin/crond -f -M /dev/null -l info
diff --git a/abs/core/runit-scripts/runitscripts/services/dbus/run b/abs/core/runit-scripts/runitscripts/services/dbus/run
index a9af150..af6ebbb 100755
--- a/abs/core/runit-scripts/runitscripts/services/dbus/run
+++ b/abs/core/runit-scripts/runitscripts/services/dbus/run
@@ -4,6 +4,10 @@ export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions
stat_runit "Starting dbus"
+if [[ ! -d /run/dbus ]]
+then
+ install -m755 -g 81 -o 81 -d /run/dbus
+fi
exec /usr/bin/dbus-daemon --system --nofork 2>/dev/null >/dev/null
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/fah/finish b/abs/core/runit-scripts/runitscripts/services/fah/finish
new file mode 100755
index 0000000..9385e7c
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/fah/finish
@@ -0,0 +1,16 @@
+#!/bin/bash
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+
+[ -e /etc/sv/fah/.runtime ] || mkdir -p /etc/sv/fah/.runtime
+touch /etc/sv/fah/.runtime/`date +%s`
+numfiles=`/usr/bin/file_time_offset.py -s4 -d/etc/sv/fah/.runtime `
+if [ $numfiles -gt 3 ]
+then
+ rm -f /etc/sv/fah/.runtime/* 2>/dev/null
+ sv stop fah
+ printhl " folding@home is not able to start, disabling it"
+fi
+
diff --git a/abs/core/runit-scripts/runitscripts/services/fah/run b/abs/core/runit-scripts/runitscripts/services/fah/run
new file mode 100644
index 0000000..1a3b8a6
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/fah/run
@@ -0,0 +1,27 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+configfile=/etc/fah-config.xml
+. /etc/systemconfig
+FOLDING_DIR=/data/storage/disk0/media/foldingathome/$hostname
+mkdir -p $FOLDING_DIR
+chown mythtv:mythtv $FOLDING_DIR
+
+if [ -d $FOLDING_DIR ]
+then
+ cd $FOLDING_DIR
+ if [ -e $configfile ]
+ then
+ stat_runit "Starting folding@home with $configfile"
+ exec /opt/fah-v7/FAHClient --config $configfile 2>&1 > /dev/null
+ else
+ stat_runit "Starting folding@home"
+
+ /opt/fah-v7/FAHClient --run-as mythtv\
+ --team=50975\
+ --user=${foldingusername}\
+ --max-packet-size=${foldingworksize} 2>&1 > /dev/null
+
+ fi
+fi \ No newline at end of file
diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/log/run b/abs/core/runit-scripts/runitscripts/services/frontend/log/run
index 463045f..801eaf2 100755
--- a/abs/core/runit-scripts/runitscripts/services/frontend/log/run
+++ b/abs/core/runit-scripts/runitscripts/services/frontend/log/run
@@ -1,5 +1,5 @@
#!/bin/sh
exec 2>&1
. /etc/systemconfig
- /usr/bin/logger -p local6.info -t mythfrontend
+ /usr/bin/logger -p local6.info -t frontend
diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/run b/abs/core/runit-scripts/runitscripts/services/frontend/run
index c1e2f2d..3711058 100755
--- a/abs/core/runit-scripts/runitscripts/services/frontend/run
+++ b/abs/core/runit-scripts/runitscripts/services/frontend/run
@@ -15,6 +15,10 @@ touch /var/log/fluxbox.log
chown mythtv:mythtv /var/log/fluxbox.log
stat_runit "Starting LinHES frontend"
+# if [ -e /service/mysql ]
+# then
+# svwaitup -s 2 /service/mysql
+# fi
#echo "Starting LinHES frontend" >/dev/tty1
exec /bin/su - mythtv -l -c /usr/LH/bin/LinHES-start
diff --git a/abs/core/runit-scripts/runitscripts/services/igdaemon/log/run b/abs/core/runit-scripts/runitscripts/services/igdaemon/log/run
new file mode 100755
index 0000000..f7e3b49
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/igdaemon/log/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+#export TERM=linux
+#. /etc/rc.conf
+#. /etc/rc.d/functions
+/usr/bin/logger -p info -t igdaemon
+
diff --git a/abs/core/runit-scripts/runitscripts/services/igdaemon/run b/abs/core/runit-scripts/runitscripts/services/igdaemon/run
index ea4f33b..37bf25c 100755
--- a/abs/core/runit-scripts/runitscripts/services/igdaemon/run
+++ b/abs/core/runit-scripts/runitscripts/services/igdaemon/run
@@ -6,4 +6,4 @@ export TERM=linux
stat_runit "Starting IguanaWorks IR daemon"
-exec /usr/bin/igdaemon --no-ids -n -l /var/log/igdaemon.log
+exec /usr/bin/igdaemon --no-ids -n
diff --git a/abs/core/runit-scripts/runitscripts/services/infinitv_usb/log/run b/abs/core/runit-scripts/runitscripts/services/infinitv_usb/log/run
new file mode 100755
index 0000000..f4de0e2
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/infinitv_usb/log/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+#export TERM=linux
+#. /etc/rc.conf
+#. /etc/rc.d/functions
+/usr/bin/logger -p info -t infinitv_usb
+
diff --git a/abs/core/runit-scripts/runitscripts/services/infinitv_usb/run b/abs/core/runit-scripts/runitscripts/services/infinitv_usb/run
new file mode 100755
index 0000000..e1f5764
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/infinitv_usb/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Start/stop the usb infinitv service
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+stat_runit "Starting InfinitTV_usb"
+exec /usr/bin/infinitv_usbd
diff --git a/abs/core/runit-scripts/runitscripts/services/lighttpd/run b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
index f9c574d..3ac10e5 100755
--- a/abs/core/runit-scripts/runitscripts/services/lighttpd/run
+++ b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
@@ -4,6 +4,21 @@ export TERM=linux
. /etc/rc.d/functions
stat_runit "Starting lighttpd"
+#---creating ssl cert
+if [ ! -f /etc/lighttpd/linhes.pem ]
+then
+ . /etc/systemconfig
+ /usr/bin/openssl req -new -x509 -keyout /etc/lighttpd/linhes.pem -out /etc/lighttpd/linhes.pem -days 4390 -nodes -subj "/C=/ST=/L=/O=LinHES/OU=LinHES Entertainment Server/CN=$hostname"
+ if [ $? = 0 ]
+ then
+ echo "include \"/etc/lighttpd/ssl-inc.conf\"" > /etc/gen_light_conf.d/ssl-inc.conf
+ else
+ rm -f /etc/lighttpd/linhes.pem
+ fi
+ /usr/LH/bin/gen_light_include.py
+fi
+#--end creating ssl cert
+
if [ ! -d /var/run/lighttpd ] ; then
mkdir -p /var/run/lighttpd
chown http /var/run/lighttpd
diff --git a/abs/core/runit-scripts/runitscripts/services/msg_daemon/run b/abs/core/runit-scripts/runitscripts/services/msg_daemon/run
new file mode 100755
index 0000000..76bb702
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/msg_daemon/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+MYTH_RUN_STATUS="1"
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/profile
+stat_runit "Starting osd message daemon"
+DISPLAY=127.0.0.1:0 /usr/LH/bin/msg_daemon.py
diff --git a/abs/core/runit-scripts/runitscripts/services/mysql/run b/abs/core/runit-scripts/runitscripts/services/mysql/run
index 9589e6d..de76962 100755
--- a/abs/core/runit-scripts/runitscripts/services/mysql/run
+++ b/abs/core/runit-scripts/runitscripts/services/mysql/run
@@ -35,5 +35,11 @@ if [ ! -d /var/run/mysqld ]; then
mkdir -p /var/run/mysqld
chown mysql /var/run/mysqld
fi
+HOME=/etc/mysql/
+MYSQLADMIN='/usr/bin/mysqladmin'
+
+trap "$MYSQLADMIN shutdown" 0
+trap 'exit 2' 1 2 3 15
+
+/usr/bin/mysqld_safe --user=mysql >/dev/null 2>/dev/null & wait
-exec /usr/sbin/mysqld -u mysql 2>/dev/null >/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/mythbackend/run b/abs/core/runit-scripts/runitscripts/services/mythbackend/run
index 273f655..903979c 100755
--- a/abs/core/runit-scripts/runitscripts/services/mythbackend/run
+++ b/abs/core/runit-scripts/runitscripts/services/mythbackend/run
@@ -4,9 +4,30 @@ exec 2>&1
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions
+
+#Run autocard
+if [ ! -e /etc/udev/mv-persistent-video.description ]
+then
+ /usr/MythVantage/bin/autocard.py insertdb >/tmp/autocard.log &
+fi
+
+#wait for mysql
+if [ -e /service/mysql ]
+then
+ /sbin/svwaitup -s 10 /service/mysql
+fi
+
+if [ -e /service/avahi ]
+then
+ /sbin/svwaitup -s 2 /service/avahi
+fi
+
#profile is here to setup LC_ALL/locale
MYTH_RUN_STATUS="1"
-. /etc/profile
+. /etc/profile
+
+MYTH_ARGS="-q --syslog local6"
+[ -f /etc/conf.d/mythbackend ] && . /etc/conf.d/mythbackend
stat_runit "Scanning for new storage"
@@ -23,13 +44,13 @@ then
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"
@@ -39,11 +60,31 @@ fi
# chown mythtv:mythtv /data/home/mythtv/gdb.txt.mythbackend
# sleep 10
#
-# else
+# else
+ if [ x"$SystemType" = "xSlave_backend" ]
+ then
+ #do init check
+ MYTHCONFDIR=/usr/share/mythtv /usr/LH/bin/be_check.py
+ rc=$?
+ while [ $rc -ne 0 ]
+ do
+ #msg "Waiting for connection to MythBackend"
+ echo " * Waiting for connection to primary MythBackend"
+ MYTHCONFDIR=/usr/share/mythtv /usr/LH/bin/be_check.py
+ rc=$?
+ sleep 6
+ done
+ stat_runit "Starting Slave MythBackend"
+ else
+ stat_runit "Starting Primary MythBackend"
+ fi
+
+
+
if pacman -Q mythtv | grep -q 0.24
then
exec su mythtv -c "/usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log"
else
- exec su mythtv -c "/usr/bin/mythbackend -q --syslog local6"
+ exec su mythtv -c "/usr/bin/mythbackend -q --syslog local6"
fi
# fi
diff --git a/abs/core/runit-scripts/runitscripts/services/mythexpress/log/run b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/run
new file mode 100755
index 0000000..e6103bc
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+#. /etc/rc.conf
+#. /etc/rc.d/functions
+/usr/bin/logger -p info -t mythexpress
+
diff --git a/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/lock b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/lock
diff --git a/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/pid b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/pid
new file mode 100644
index 0000000..823f8cf
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/pid
@@ -0,0 +1 @@
+2952
diff --git a/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/stat b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/stat
new file mode 100644
index 0000000..e7452fb
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/stat
@@ -0,0 +1 @@
+run, want exit
diff --git a/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/status b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/status
new file mode 100644
index 0000000..f85f336
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythexpress/log/supervise/status
Binary files differ
diff --git a/abs/core/runit-scripts/runitscripts/services/mythexpress/run b/abs/core/runit-scripts/runitscripts/services/mythexpress/run
new file mode 100755
index 0000000..db3eba1
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythexpress/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+/sbin/svwaitup -s 10 /service/avahi
+stat_runit "Starting MythExpress"
+exec su http -s/bin/bash -c "node /usr/mythexpress/app.js"
+
diff --git a/abs/core/runit-scripts/runitscripts/services/mythzmserver/log/run b/abs/core/runit-scripts/runitscripts/services/mythzmserver/log/run
new file mode 100755
index 0000000..e08d29e
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythzmserver/log/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 2>&1
+. /etc/systemconfig
+ /usr/bin/logger -p local6.info -t mythzmserver
+
diff --git a/abs/core/runit-scripts/runitscripts/services/mythzmserver/run b/abs/core/runit-scripts/runitscripts/services/mythzmserver/run
new file mode 100755
index 0000000..f925255
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythzmserver/run
@@ -0,0 +1,11 @@
+#!/bin/sh
+#set -x
+exec 2>&1
+export TERM=linux
+MYTH_RUN_STATUS="1"
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/profile
+setfacl -R -m u:http:rX /etc/zm.conf
+stat_runit "Starting MythZoneminder Service"
+exec sudo -u http "mythzmserver"
diff --git a/abs/core/runit-scripts/runitscripts/services/ncid-server/run b/abs/core/runit-scripts/runitscripts/services/ncid-server/run
index 126909d..337b028 100644
--- a/abs/core/runit-scripts/runitscripts/services/ncid-server/run
+++ b/abs/core/runit-scripts/runitscripts/services/ncid-server/run
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Start/stop the ncid-client
+# Start/stop the ncid-server
#
. /etc/rc.conf
. /etc/rc.d/functions
@@ -11,5 +11,10 @@ if [ -f /etc/ncid/ncidd-user.conf ]
then
exec /usr/sbin/ncidd -D -C /etc/ncid/ncidd-user.conf
else
- exec /usr/sbin/ncidd -D -t /dev/$nciddSerialPort
+ if [ x$nciddDeviceNetCallerID = "x1" ]
+ then
+ exec /usr/sbin/ncidd -D -t /dev/$nciddSerialPort --nomodem 1 -S 4800
+ else
+ exec /usr/sbin/ncidd -D -t /dev/$nciddSerialPort -S 4800
+ fi
fi
diff --git a/abs/core/runit-scripts/runitscripts/services/ntpd/finish b/abs/core/runit-scripts/runitscripts/services/ntpd/finish
new file mode 100755
index 0000000..ba564e7
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/ntpd/finish
@@ -0,0 +1,7 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Stopping NTPD"
+printhl " setting hwclock"
+exec /sbin/hwclock --utc -w
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/remotes/run b/abs/core/runit-scripts/runitscripts/services/remotes/run
index 2248322..4040d7e 100755
--- a/abs/core/runit-scripts/runitscripts/services/remotes/run
+++ b/abs/core/runit-scripts/runitscripts/services/remotes/run
@@ -1,8 +1,6 @@
#!/bin/bash
-
exec 2>&1
export TERM=linux
-
. /etc/rc.conf
. /etc/rc.d/functions
. /usr/MythVantage/bin/install_functions.sh
@@ -16,8 +14,6 @@ fi
echo "`date` --- run started" >> $LOG
-
-
#What is done in this file may not be enough to start your specific remote.
#If that is true of your remote place your remote startup commands in:
# /etc/runit/lirc.sh
@@ -32,30 +28,30 @@ then
else
. /etc/systemconfig
stat_runit "Starting remotes"
-
+
[ -e /etc/sv/remotes/.runtime ] || mkdir -p /etc/sv/remotes/.runtime
[ -e /var/run/lirc ] || mkdir -p /var/run/lirc
-
+
num_lirc=`ls -la /dev/lirc[0-9] 2>/dev/null |wc -l `
num_lirc=$((num_lirc-1))
-
+
serial_port=""
-
- if [ x$ReceiverType = xSerial ]
+
+ if [ x$ReceiverType = xserial ]
then
serial_port=$ReceiverSerialport
- elif [ x$HostBlasterType = xSerial ]
+ elif [ x$HostBlasterType = xserial ]
then
serial_port=$HostSerialPort_blasterlirc
fi
-
+
if [ -n "$serial_port" ]
then
#/dev/ttyS0 (COM1), port 0x3f8, irq 4
#/dev/ttyS1 (COM2), port 0x2f8, irq 3
#/dev/ttyS2 (COM3), port 0x3e8, irq 4
#/dev/ttyS3 (COM4), port 0x2e8, irq 3
-
+
case $serial_port in
ttyS0)
FLAGS="io=0x3f8 irq=4"
@@ -75,13 +71,14 @@ else
/sbin/modprobe lirc_serial $FLAGS
sleep 0.5
fi
-
+
if [ x$HostBlasterType = xCommandIR -o x$ReceiverType = xCommandIR ]
then
CMD="/usr/sbin/lircd -r -n --driver=commandir"
printhl " Using commandir"
echo $CMD >>$LOG
$CMD >>$LOG 2>>$LOG
+
elif [ x$HostBlasterType = xiguanaIR-usb -o x$ReceiverType = xiguanaIR-usb ]
then
sv start igdaemon
@@ -89,6 +86,7 @@ else
printhl " Using iguanaIR usb"
echo $CMD >>$LOG
$CMD >>$LOG 2>>$LOG
+
elif [ x$ReceiverType = "xSiliconDust_HDHR" ]
then
# if using the SiliconDust_HDHR as an I/R Receiver
@@ -96,34 +94,116 @@ else
printhl " Using SiliconDust on port 5000"
echo $CMD >>$LOG
$CMD >>$LOG 2>>$LOG
+
else
- LASTCMD=""
-
- for i in `seq 1 $num_lirc`
- do
- CMD="/usr/sbin/lircd -r -d /dev/lirc$i --output=/var/run/lirc/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i"
- printhl " Device $i"
- echo $CMD >>$LOG
- $CMD >>$LOG 2>>$LOG
- LASTCMD="--connect=localhost:876$i $LASTCMD "
- done
-
- echo $LASTCMD >>$LOG
-
if [ -f /etc/remote.run ]
then
#program must not terminate.
-
stat_runit "Starting remotes from /etc/remote.run"
- LCMD="/etc/remote.run $LASTCMD"
+ LCMD="/etc/remote.run"
echo "Starting remotes from $LCMD" >>$LOG
exec $LCMD >>$LOG 2>>$LOG
else
+ #/etc/remote.run not found, carry one with normal init
+ LASTCMD=""
+ USE_BLASTER="False"
+ DEFINED_RECEIVER="False"
+
+ case x$ReceiverType in
+ xmce)
+ IRNODE=/dev/remotes/mce_lirc
+ DEFINED_RECEIVER="True"
+ LASTCMD="--connect=localhost:8761"
+ ;;
+ xserial)
+ IRNODE=/dev/remotes/serial_lirc
+ DEFINED_RECEIVER="True"
+ LASTCMD="--connect=localhost:8761"
+ ;;
+ xNone)
+ IRNODE='None'
+ DEFINED_RECEIVER="False"
+ ;;
+ xstreamzap)
+ IRNODE=/dev/remotes/streamzap_lirc
+ DEFINED_RECEIVER="True"
+ LASTCMD="--connect=localhost:8761"
+ ;;
+ xhd_pvr)
+ IRNODE=/dev/remotes/hdpvr_lirc
+ DEFINED_RECEIVER="True"
+ LASTCMD="--connect=localhost:8761"
+ ;;
+
+ Default|*)
+ DEFINED_RECEIVER="False"
+ for i in `seq 1 $num_lirc`
+ do
+ CMD="/usr/sbin/lircd -r -d /dev/lirc$i --output=/var/run/lirc/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i"
+ printhl " Device $i"
+ echo $CMD >>$LOG
+ $CMD >>$LOG 2>>$LOG
+ LASTCMD="--connect=localhost:876$i $LASTCMD "
+ done
+ ;;
+ esac
+
+ #find valid blaster device and make it the LCMD
+ # Receiver, Serial, MCE, NONE
+ case x$HostBlasterType in
+ xmce)
+ BLASTERNODE=/dev/remotes/mce_lirc
+ USE_BLASTER="True"
+ ;;
+ xserial)
+ BLASTERNODE=/dev/remotes/serial_lirc
+ USE_BLASTER="True"
+ ;;
+ xNone)
+ BLASTERNODE='None'
+ USE_BLASTER="False"
+ ;;
+ xReceiver)
+ BLASTERNODE=$IRNODE
+ USE_BLASTER="True"
+ DEFINED_RECEIVER="False"
+ ;;
+ xhd_pvr)
+ BLASTERNODE=/dev/remotes/hdpvr_lirc
+ USE_BLASTER="True"
+ esac
+
+
+ if [ x$USE_BLASTER = xTrue -a x$DEFINED_RECEIVER = xTrue ]
+ then
+ #start receiver
+ #start blaster chain
+ CMD="/usr/sbin/lircd -r -d $IRNODE --output=/var/run/lirc/lircd1 --pidfile=/var/run/lircd1.pid --listen=8761"
+ LCMD="/usr/sbin/lircd -r -n -d $BLASTERNODE --output /var/run/lirc/lircd $LASTCMD"
+ echo $CMD >>$LOG
+ $CMD >>$LOG 2>>$LOG
+
+ elif [ x$USE_BLASTER = xTrue ]
+ then
+ #start only the blaster
+ LCMD="/usr/sbin/lircd -r -n -d $BLASTERNODE --output /var/run/lirc/lircd $LASTCMD"
+
+ elif [ x$DEFINED_RECEIVER = xTrue ]
+ then
+ #start reciever
+ LCMD="/usr/sbin/lircd -r -n -d $IRNODE --output /var/run/lirc/lircd"
+
+ else
+ #default case of /dev/lirc0
+ LCMD="/usr/sbin/lircd -r -n -d /dev/lirc0 --output /var/run/lirc/lircd $LASTCMD"
+ fi
+
+ echo $LASTCMD >>$LOG
echo "Disable in kernel remote driver" >>$LOG
in_kernel_support "disable"
- LCMD="/usr/sbin/lircd -r -n -d /dev/lirc0 --output /var/run/lirc/lircd $LASTCMD"
echo "Starting remotes from $LCMD" >>$LOG
exec $LCMD >>$LOG 2>>$LOG
+
fi
fi
fi
diff --git a/abs/core/runit-scripts/runitscripts/services/remyth/log/run b/abs/core/runit-scripts/runitscripts/services/remyth/log/run
new file mode 100755
index 0000000..3c669f5
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/remyth/log/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+#. /etc/rc.conf
+#. /etc/rc.d/functions
+/usr/bin/logger -p info -t remyth
+
diff --git a/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/lock b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/lock
diff --git a/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/pid b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/pid
new file mode 100644
index 0000000..823f8cf
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/pid
@@ -0,0 +1 @@
+2952
diff --git a/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/stat b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/stat
new file mode 100644
index 0000000..e7452fb
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/stat
@@ -0,0 +1 @@
+run, want exit
diff --git a/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/status b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/status
new file mode 100644
index 0000000..f85f336
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/remyth/log/supervise/status
Binary files differ
diff --git a/abs/core/runit-scripts/runitscripts/services/remyth/run b/abs/core/runit-scripts/runitscripts/services/remyth/run
new file mode 100755
index 0000000..768ec13
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/remyth/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+/sbin/svwaitup -s 10 /service/avahi
+
+stat_runit "Starting ReMyth"
+exec su http -s/bin/bash -c "node /usr/remyth/server.js"
+
diff --git a/abs/core/runit-scripts/runitscripts/services/supplemental-slave/run b/abs/core/runit-scripts/runitscripts/services/supplemental-slave/run
new file mode 100755
index 0000000..5be390d
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/supplemental-slave/run
@@ -0,0 +1,11 @@
+#!/bin/sh
+#set -x
+exec 2>&1
+export TERM=linux
+MYTH_RUN_STATUS="1"
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/profile
+stat_runit "Starting supplemental web client"
+cd /data/srv/httpd/cgi
+exec sudo -u http "./slaveserve.py" 2>/var/log/supplemental-slave.log
diff --git a/abs/core/runit-scripts/runitscripts/services/udevil/log/run b/abs/core/runit-scripts/runitscripts/services/udevil/log/run
new file mode 100755
index 0000000..db4817f
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/udevil/log/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+exec 2>&1
+#export TERM=linux
+#. /etc/rc.conf
+#. /etc/rc.d/functions
+#stat_runit "Starting devmon logger"
+/usr/bin/logger -p info -t udevil
+
diff --git a/abs/core/runit-scripts/runitscripts/services/udevil/run b/abs/core/runit-scripts/runitscripts/services/udevil/run
new file mode 100644
index 0000000..46f922c
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/udevil/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "starting udevil"
+exec /usr/bin/devmon -g
diff --git a/abs/core/runit-scripts/runitscripts/services/vnc/finish b/abs/core/runit-scripts/runitscripts/services/vnc/finish
new file mode 100755
index 0000000..605a0c4
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/vnc/finish
@@ -0,0 +1,14 @@
+#!/bin/sh
+#set -x
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Stopping vnc service"
+rm -f /etc/avahi/services/vnc.service 2>/dev/null
+su vncsvc -c "vncserver -kill :1"
+XFILE="/tmp/.X11-unix/X1"
+if [ -e $XFILE ]
+then
+ rm -f $XFILE
+fi
diff --git a/abs/core/runit-scripts/runitscripts/services/vnc/run b/abs/core/runit-scripts/runitscripts/services/vnc/run
new file mode 100755
index 0000000..1c01371
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/vnc/run
@@ -0,0 +1,15 @@
+#!/bin/sh
+#set -x
+exec 2>&1
+export TERM=linux
+MYTH_RUN_STATUS="1"
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/profile
+stat_runit "Starting vnc service"
+geometry=1024x768
+#. /etc/conf.d/vncserver 2>/dev/null
+cp -f $MV_ROOT/templates/vnc.service /etc/avahi/services/vnc.service 2>/dev/null
+cd ~vncsvc
+exec su vncsvc -c "/usr/bin/vncserver -fg -geometry $geometry :1" 2>/var/log/vnc.log
+
diff --git a/abs/core/runit-scripts/runitscripts/services/xymon-client/run b/abs/core/runit-scripts/runitscripts/services/xymon-client/run
index a454c6b..fcd5093 100644
--- a/abs/core/runit-scripts/runitscripts/services/xymon-client/run
+++ b/abs/core/runit-scripts/runitscripts/services/xymon-client/run
@@ -46,7 +46,7 @@ do
done
XYMONCLIENTHOME="`dirname $0`"
-XYMONCLIENTHOME="/data/srv/xymon/client"
+XYMONCLIENTHOME="/home/xymon/client"
export MACHINEDOTS SERVEROSTYPE XYMONOSSCRIPT XYMONCLIENTHOME CONFIGCLASS
MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`"
diff --git a/abs/core/runit-scripts/runitscripts/services/xymon-server/run b/abs/core/runit-scripts/runitscripts/services/xymon-server/run
index b850c0a..6198543 100644
--- a/abs/core/runit-scripts/runitscripts/services/xymon-server/run
+++ b/abs/core/runit-scripts/runitscripts/services/xymon-server/run
@@ -6,4 +6,4 @@ export TERM=linux
stat_runit "Starting xymon server"
-exec sudo -u nobody /data/srv/xymon/server/bin/xymonlaunch --config=/data/srv/xymon/server/etc/tasks.cfg --env=/data/srv/xymon/server/etc/xymonserver.cfg --log=/var/log/hobbit/xymonlaunch.log --pidfile=/var/log/hobbit/xymonlaunch.pid --no-daemon
+exec sudo -u nobody /home/xymon/server/bin/xymonlaunch --config=/home/xymon/server/etc/tasks.cfg --env=/home/xymon/server/etc/xymonserver.cfg --log=/var/log/hobbit/xymonlaunch.log --pidfile=/var/log/hobbit/xymonlaunch.pid --no-daemon
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
+
+
+
+
+