This commit is contained in:
Jack L. Frost 2014-06-28 10:54:06 +04:00
parent 20f1cad363
commit c9168818d4
8 changed files with 31 additions and 12 deletions

10
init.d/bitflu Executable file
View File

@ -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
}

View File

@ -5,7 +5,6 @@ unset reload
service_command='/usr/bin/cjdroute' service_command='/usr/bin/cjdroute'
cjdroute_config='/etc/cjdroute.conf' cjdroute_config='/etc/cjdroute.conf'
cjdroute_admin_port='11234' cjdroute_admin_port='11234'
cjdroute.check_tun_module() { cjdroute.check_tun_module() {
@ -29,5 +28,7 @@ start() {
return 1 return 1
} }
"$service_command" < "$cjdroute_config" &>"$service_logfile" "$service_command" < "${cjdroute_config}" &>"$service_logfile" && {
watchman.msg "${service_name} started"
}
} }

View File

@ -3,3 +3,5 @@
service_command='/usr/sbin/dhcpcd' service_command='/usr/sbin/dhcpcd'
service_pidfile='/var/run/dhcpcd.pid' service_pidfile='/var/run/dhcpcd.pid'
source "${cfg_dir}/conf.d/dhcpcd.sh"

View File

@ -1,15 +1,15 @@
#!/usr/bin/env watchman #!/usr/bin/env watchman
service_command='/bin/fsck'
service_args='-A -C -p'
service_type='oneshot' service_type='oneshot'
unset stop restart status
start() { start() {
watchman.msg "Remounting / as read-only..." watchman.msg "Remounting / as read-only..."
mount / -o remount,ro mount / -o remount,ro
watchman.msg "Checking filesystems..." watchman.msg "Checking filesystems..."
/bin/fsck -A -p watchman.start
watchman.msg "Remounting / as read-write..." watchman.msg "Remounting / as read-write..."
mount / -o remount,rw mount / -o remount,rw

7
init.d/openvpn-mh Executable file
View File

@ -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"

5
init.d/pamusb Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env watchman
service_command='mkdir'
service_args='-p /run/lock'
service_type='oneshot'

View File

@ -13,9 +13,3 @@ done
service_type='oneshot' service_type='oneshot'
service_command='/sbin/sysctl' service_command='/sbin/sysctl'
service_args="-p /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf" service_args="-p /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf"
start() {
watchman.start
}
unset restart reload

View File

@ -1,6 +1,6 @@
#!/usr/bin/env watchman #!/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}" cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}"