From c9168818d4fc7e25b85ddefaa1165bcef9f8ec0f Mon Sep 17 00:00:00 2001 From: fbt Date: Sat, 28 Jun 2014 10:54:06 +0400 Subject: [PATCH] blah --- init.d/bitflu | 10 ++++++++++ init.d/cjdroute | 5 +++-- init.d/dhcpcd | 2 ++ init.d/fsck | 6 +++--- init.d/openvpn-mh | 7 +++++++ init.d/pamusb | 5 +++++ init.d/sysctl | 6 ------ init.d/udev | 2 +- 8 files changed, 31 insertions(+), 12 deletions(-) create mode 100755 init.d/bitflu create mode 100755 init.d/openvpn-mh create mode 100755 init.d/pamusb diff --git a/init.d/bitflu b/init.d/bitflu new file mode 100755 index 0000000..0f7fb6b --- /dev/null +++ b/init.d/bitflu @@ -0,0 +1,10 @@ +#!/usr/bin/env watchman + +service_username='torrent' +service_command='sudo' +service_args="-u $service_username -- /usr/bin/bitflu --config=/etc/bitflu.cfg" + +start() { + umask 0007 + watchman.start +} diff --git a/init.d/cjdroute b/init.d/cjdroute index 3659121..cac2f2a 100755 --- a/init.d/cjdroute +++ b/init.d/cjdroute @@ -5,7 +5,6 @@ unset reload service_command='/usr/bin/cjdroute' cjdroute_config='/etc/cjdroute.conf' - cjdroute_admin_port='11234' cjdroute.check_tun_module() { @@ -29,5 +28,7 @@ start() { return 1 } - "$service_command" < "$cjdroute_config" &>"$service_logfile" + "$service_command" < "${cjdroute_config}" &>"$service_logfile" && { + watchman.msg "${service_name} started" + } } diff --git a/init.d/dhcpcd b/init.d/dhcpcd index f28564f..ba522b6 100755 --- a/init.d/dhcpcd +++ b/init.d/dhcpcd @@ -3,3 +3,5 @@ service_command='/usr/sbin/dhcpcd' service_pidfile='/var/run/dhcpcd.pid' + +source "${cfg_dir}/conf.d/dhcpcd.sh" diff --git a/init.d/fsck b/init.d/fsck index 749a135..897dd29 100755 --- a/init.d/fsck +++ b/init.d/fsck @@ -1,15 +1,15 @@ #!/usr/bin/env watchman +service_command='/bin/fsck' +service_args='-A -C -p' service_type='oneshot' -unset stop restart status - start() { watchman.msg "Remounting / as read-only..." mount / -o remount,ro watchman.msg "Checking filesystems..." - /bin/fsck -A -p + watchman.start watchman.msg "Remounting / as read-write..." mount / -o remount,rw diff --git a/init.d/openvpn-mh b/init.d/openvpn-mh new file mode 100755 index 0000000..ea0c0a1 --- /dev/null +++ b/init.d/openvpn-mh @@ -0,0 +1,7 @@ +#!/usr/bin/env watchman + +cfg_ovpn_instance="${service_name##*-}" + +service_command="/usr/sbin/openvpn" +service_workdir="/etc/openvpn/$cfg_ovpn_instance" +service_args="client.cfg" diff --git a/init.d/pamusb b/init.d/pamusb new file mode 100755 index 0000000..c7ada0c --- /dev/null +++ b/init.d/pamusb @@ -0,0 +1,5 @@ +#!/usr/bin/env watchman + +service_command='mkdir' +service_args='-p /run/lock' +service_type='oneshot' diff --git a/init.d/sysctl b/init.d/sysctl index 10353d3..2d39d30 100755 --- a/init.d/sysctl +++ b/init.d/sysctl @@ -13,9 +13,3 @@ done service_type='oneshot' service_command='/sbin/sysctl' service_args="-p /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf" - -start() { - watchman.start -} - -unset restart reload diff --git a/init.d/udev b/init.d/udev index e98d088..69ce9d4 100755 --- a/init.d/udev +++ b/init.d/udev @@ -1,6 +1,6 @@ #!/usr/bin/env watchman -service_command='/usr/lib/systemd/systemd-udevd' +source "${cfg_dir}/conf.d/udev.sh" cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}"