diff --git a/conf.d/devfs-links b/conf.d/devfs-links deleted file mode 100644 index 9d9b7ff..0000000 --- a/conf.d/devfs-links +++ /dev/null @@ -1,8 +0,0 @@ -# Config for devfs-links - -cfg_links=( - '/proc/self/fd;/dev/fd' - '/proc/self/fd/0;/dev/stdin' - '/proc/self/fd/1;/dev/stdout' - '/proc/self/fd/2;/dev/stderr' -) diff --git a/init.d/acpid b/init.d/acpid deleted file mode 100755 index 9e87f3d..0000000 --- a/init.d/acpid +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -service_respawn='true' -service_command='/usr/bin/acpid' -service_args=( -f ) diff --git a/init.d/agetty b/init.d/agetty deleted file mode 100755 index 44fe63c..0000000 --- a/init.d/agetty +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -service_respawn='true' -service_command='/usr/bin/agetty' -service_args=( 38400 "${service_name##*-}" linux ) diff --git a/init.d/chef-client b/init.d/chef-client deleted file mode 100755 index e476775..0000000 --- a/init.d/chef-client +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn=true -service_command='/usr/bin/chef-client' -service_args=( -i 600 -s 3 -l info ) diff --git a/init.d/chrony b/init.d/chrony deleted file mode 100755 index cba37d0..0000000 --- a/init.d/chrony +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/chronyd' -service_args=( -u chrony ) diff --git a/init.d/connmand b/init.d/connmand deleted file mode 100755 index c7b01ec..0000000 --- a/init.d/connmand +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env ssm -# Author: Alad Wenter - -depends dbus || return 1 - -#service_respawn='true' -service_command='/usr/bin/connmand' -service_args=( -n ) diff --git a/init.d/cronie b/init.d/cronie deleted file mode 100755 index 0b1105d..0000000 --- a/init.d/cronie +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ssm - -service_command='/bin/crond' -service_args=( -n ) diff --git a/init.d/cupsd b/init.d/cupsd deleted file mode 100755 index 80c7423..0000000 --- a/init.d/cupsd +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/cupsd' -service_args=( -f ) diff --git a/init.d/devfs-links b/init.d/devfs-links deleted file mode 100755 index 23a6256..0000000 --- a/init.d/devfs-links +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ssm -# This is a script to set up the links in /dev in absence of e?(u|s?m)dev. - -service_type='oneshot' - -# Config moved to conf.d - -spawn() { - for l in "${cfg_links[@]}"; do - IFS=';' read dest link <<< "$l" - - [[ -e "$link" ]] || { - [[ -e "$dest" ]] && { - ln -s "$dest" "$link" - } - } - done -} diff --git a/init.d/fcgiwrap b/init.d/fcgiwrap deleted file mode 100755 index e8fe3d2..0000000 --- a/init.d/fcgiwrap +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ssm -# The configuration is in conf.d. - -#service_respawn='true' -service_command='/usr/bin/spawn-fcgi' -service_args=( -s "$cfg_socket" -P "$service_pidfile" -u "$cfg_user" -g "$cfg_group" -- /usr/bin/fcgiwrap ) diff --git a/init.d/ferm b/init.d/ferm deleted file mode 100755 index c33c2f6..0000000 --- a/init.d/ferm +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ssm - -service_type='oneshot' -service_command='/usr/bin/ferm' -service_args=( /etc/ferm.conf ) - -reload() { - "$service_command" "${service_args[@]}" -} diff --git a/init.d/haproxy b/init.d/haproxy deleted file mode 100755 index eaa32fd..0000000 --- a/init.d/haproxy +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn=true -service_command='/usr/bin/haproxy' -service_args=( -db -f /etc/haproxy/haproxy.cfg ) diff --git a/init.d/haveged b/init.d/haveged deleted file mode 100755 index 69586c3..0000000 --- a/init.d/haveged +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ssm - -service_command=/usr/bin/haveged -service_args=( -F -w 1024 -v 1 ) diff --git a/init.d/mariadb b/init.d/mariadb deleted file mode 100755 index c415cf6..0000000 --- a/init.d/mariadb +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_workdir='/usr' -service_command='/usr/bin/mysqld_safe' -service_args=( --datadir=/var/lib/mysql ) diff --git a/init.d/memcached b/init.d/memcached deleted file mode 100755 index e3ba7e4..0000000 --- a/init.d/memcached +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn=true -service_command='/usr/bin/memcached' -service_args=( -m 64 -p 11211 -u nobody -l 127.0.0.1 ) diff --git a/init.d/mpd b/init.d/mpd deleted file mode 100755 index a9f45ce..0000000 --- a/init.d/mpd +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn=true -service_command='/usr/bin/mpd' -service_args=( --no-daemon ) diff --git a/init.d/network b/init.d/network deleted file mode 100755 index 31f1003..0000000 --- a/init.d/network +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env ssm - -service_type='oneshot' -service_command=( /usr/bin/znet -d up ) - -ifaces=( 'eth0' 'warp' ) - -pre_stop() { - "$service_command" "${service_args[@]}" down -} diff --git a/init.d/ntp b/init.d/ntp deleted file mode 100755 index 764207b..0000000 --- a/init.d/ntp +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/ntpd' -service_args=( -n ) diff --git a/init.d/oidentd b/init.d/oidentd deleted file mode 100755 index c4cb16f..0000000 --- a/init.d/oidentd +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ssm - -service_command='/usr/bin/oidentd' -service_args=( -i ) diff --git a/init.d/openntpd b/init.d/openntpd deleted file mode 100755 index ee0ef0d..0000000 --- a/init.d/openntpd +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/ntpd' -service_args=( -d ) diff --git a/init.d/openvpn-server b/init.d/openvpn-server deleted file mode 100755 index 7ff704e..0000000 --- a/init.d/openvpn-server +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ssm - -service_respawn='true' -service_command="/usr/sbin/openvpn" -service_workdir="/etc/openvpn" -service_args=( server.conf ) diff --git a/init.d/pamusb b/init.d/pamusb deleted file mode 100755 index e5edc0c..0000000 --- a/init.d/pamusb +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -service_type='oneshot' -service_command='/usr/bin/mkdir' -service_args=( -p /run/lock ) diff --git a/init.d/php-fpm b/init.d/php-fpm deleted file mode 100755 index 58eae5e..0000000 --- a/init.d/php-fpm +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/php-fpm' -service_args=( -F --fpm-config /etc/php/php-fpm.conf -c /etc/php/php.ini ) diff --git a/init.d/preload b/init.d/preload deleted file mode 100755 index 3793d50..0000000 --- a/init.d/preload +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/preload' -service_args=( -f ) diff --git a/init.d/privoxy b/init.d/privoxy deleted file mode 100755 index 24d9fc3..0000000 --- a/init.d/privoxy +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env ssm - -privoxy_username='privoxy' -privoxy_configfile='/etc/privoxy/config' - -#service_respawn='true' -service_command='/usr/bin/privoxy' -service_args=( --no-daemon --user "$privoxy_username" "$privoxy_configfile" ) - -pre_restart() { - "$service_command" --config-test "${service_args[@]}" -} diff --git a/init.d/scron b/init.d/scron deleted file mode 100755 index 52ff7f6..0000000 --- a/init.d/scron +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/crond' -service_args=( -n ) diff --git a/init.d/syslog-ng b/init.d/syslog-ng deleted file mode 100755 index 08fa1fb..0000000 --- a/init.d/syslog-ng +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn=true -service_command='/usr/bin/syslog-ng' -service_args=( -F ) diff --git a/init.d/teamviewerd b/init.d/teamviewerd deleted file mode 100755 index 2c0bb0a..0000000 --- a/init.d/teamviewerd +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn=true -service_pidfile='/run/teamviewerd.pid' -service_command='/opt/teamviewer8/tv_bin/teamviewerd' -service_args=( -d ) diff --git a/init.d/vixie-cron b/init.d/vixie-cron deleted file mode 100755 index ca2495a..0000000 --- a/init.d/vixie-cron +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn='true' -service_command='/usr/bin/crond' -service_args=( -f ) diff --git a/init.d/wpa_supplicant b/init.d/wpa_supplicant deleted file mode 100755 index 7d8e014..0000000 --- a/init.d/wpa_supplicant +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -service_command='/usr/bin/wpa_supplicant' -service_config='/etc/wpa_supplicant/wpa_supplicant.conf' -service_args=( -i "${service_name##*-}" -c "$service_config" ) diff --git a/init.d/xinetd b/init.d/xinetd deleted file mode 100755 index 0b96e6b..0000000 --- a/init.d/xinetd +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ssm - -#service_respawn=true -service_command='/usr/bin/xinetd' -service_args=( -dontfork ) diff --git a/init.d/znet b/init.d/znet deleted file mode 100755 index 31f1003..0000000 --- a/init.d/znet +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env ssm - -service_type='oneshot' -service_command=( /usr/bin/znet -d up ) - -ifaces=( 'eth0' 'warp' ) - -pre_stop() { - "$service_command" "${service_args[@]}" down -} diff --git a/init.d/README b/services/README similarity index 100% rename from init.d/README rename to services/README diff --git a/services/acpid b/services/acpid new file mode 100755 index 0000000..9f3376c --- /dev/null +++ b/services/acpid @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +service_respawn='true' +service_command=( /usr/bin/acpid -f ) diff --git a/services/agetty b/services/agetty new file mode 100755 index 0000000..fcd3583 --- /dev/null +++ b/services/agetty @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +service_respawn='true' +service_command=( /usr/bin/agetty 38400 "${service_name##*-}" linux ) diff --git a/init.d/agetty-tty1 b/services/agetty-tty1 similarity index 100% rename from init.d/agetty-tty1 rename to services/agetty-tty1 diff --git a/init.d/agetty-tty2 b/services/agetty-tty2 similarity index 100% rename from init.d/agetty-tty2 rename to services/agetty-tty2 diff --git a/init.d/agetty-tty3 b/services/agetty-tty3 similarity index 100% rename from init.d/agetty-tty3 rename to services/agetty-tty3 diff --git a/init.d/agetty-tty4 b/services/agetty-tty4 similarity index 100% rename from init.d/agetty-tty4 rename to services/agetty-tty4 diff --git a/init.d/agetty-tty5 b/services/agetty-tty5 similarity index 100% rename from init.d/agetty-tty5 rename to services/agetty-tty5 diff --git a/init.d/agetty-tty6 b/services/agetty-tty6 similarity index 100% rename from init.d/agetty-tty6 rename to services/agetty-tty6 diff --git a/init.d/alsa b/services/alsa similarity index 61% rename from init.d/alsa rename to services/alsa index 762bb56..020a05f 100755 --- a/init.d/alsa +++ b/services/alsa @@ -1,8 +1,7 @@ #!/usr/bin/env ssm #service_respawn='true' -service_command='/usr/bin/alsactl' -service_args=( rdaemon ) +service_command=( /usr/bin/alsactl rdaemon ) stop() { "$service_command" kill save_and_quit diff --git a/init.d/atd b/services/atd similarity index 100% rename from init.d/atd rename to services/atd diff --git a/init.d/binfmt-register b/services/binfmt-register similarity index 100% rename from init.d/binfmt-register rename to services/binfmt-register diff --git a/init.d/bitlbee b/services/bitlbee similarity index 67% rename from init.d/bitlbee rename to services/bitlbee index e8427a8..2697c45 100755 --- a/init.d/bitlbee +++ b/services/bitlbee @@ -3,5 +3,4 @@ # Modify it for your setup. #service_respawn=true -service_command='/usr/bin/bitlbee' -service_args=( -n ) +service_command=( /usr/bin/bitlbee -n ) diff --git a/init.d/cgmanager b/services/cgmanager similarity index 100% rename from init.d/cgmanager rename to services/cgmanager diff --git a/services/chef-client b/services/chef-client new file mode 100755 index 0000000..2f5a957 --- /dev/null +++ b/services/chef-client @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/chef-client -i 600 -s 3 -l info ) diff --git a/services/chrony b/services/chrony new file mode 100755 index 0000000..693db2f --- /dev/null +++ b/services/chrony @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn='true' +service_command=( /usr/bin/chronyd -u chrony ) diff --git a/init.d/cjdroute b/services/cjdroute similarity index 100% rename from init.d/cjdroute rename to services/cjdroute diff --git a/services/connmand b/services/connmand new file mode 100755 index 0000000..8f03566 --- /dev/null +++ b/services/connmand @@ -0,0 +1,5 @@ +#!/usr/bin/env ssm +# Author: Alad Wenter + +service_depends=( dbus ) +service_command=( /usr/bin/connmand -n ) diff --git a/services/cronie b/services/cronie new file mode 100755 index 0000000..82d9211 --- /dev/null +++ b/services/cronie @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /bin/crond -n ) diff --git a/services/cupsd b/services/cupsd new file mode 100755 index 0000000..3434bec --- /dev/null +++ b/services/cupsd @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn='true' +service_command=( /usr/bin/cupsd -f ) diff --git a/init.d/dbus b/services/dbus similarity index 66% rename from init.d/dbus rename to services/dbus index 6cc9820..c20a73a 100755 --- a/init.d/dbus +++ b/services/dbus @@ -1,8 +1,7 @@ #!/usr/bin/env ssm #service_respawn=true -service_command='/usr/bin/dbus-daemon' -service_args=( --system --nofork ) +service_command=( /usr/bin/dbus-daemon --system --nofork ) service_tmpfiles=( '/run/dbus:dir' ) pre_start() { diff --git a/init.d/dhcpcd b/services/dhcpcd similarity index 57% rename from init.d/dhcpcd rename to services/dhcpcd index 08d6ec5..c5a2048 100755 --- a/init.d/dhcpcd +++ b/services/dhcpcd @@ -2,5 +2,4 @@ # dhcp client daemon initscript #service_respawn=true -service_command='/usr/bin/dhcpcd' -service_args=( -B ) +service_command=( /usr/bin/dhcpcd -B ) diff --git a/init.d/dnscrypt b/services/dnscrypt similarity index 84% rename from init.d/dnscrypt rename to services/dnscrypt index 12f4bc7..33a6743 100755 --- a/init.d/dnscrypt +++ b/services/dnscrypt @@ -4,8 +4,8 @@ depends dnscrypt-backup #service_respawn='true' -service_command='/usr/bin/dnscrypt-proxy' -service_args=( +service_command=( + '/usr/bin/dnscrypt-proxy' "--local-address=${local_ip}:${local_port}" "--resolver-address=${resolver_ip}:${resolver_port}" "--provider-name=${provider_name}" diff --git a/init.d/dnscrypt-backup b/services/dnscrypt-backup similarity index 80% rename from init.d/dnscrypt-backup rename to services/dnscrypt-backup index 7efb0f6..5eb2773 100755 --- a/init.d/dnscrypt-backup +++ b/services/dnscrypt-backup @@ -1,8 +1,8 @@ #!/usr/bin/env ssm #service_respawn='true' -service_command='/usr/bin/dnscrypt-proxy' -service_args=( +service_command=( + '/usr/bin/dnscrypt-proxy' "--local-address=${local_ip}:${local_port}" "--resolver-address=${resolver_ip}:${resolver_port}" "--provider-name=${provider_name}" diff --git a/init.d/docker b/services/docker similarity index 100% rename from init.d/docker rename to services/docker diff --git a/init.d/dropbear b/services/dropbear similarity index 100% rename from init.d/dropbear rename to services/dropbear diff --git a/init.d/eth0.iface b/services/eth0.iface similarity index 100% rename from init.d/eth0.iface rename to services/eth0.iface diff --git a/init.d/eudev b/services/eudev similarity index 100% rename from init.d/eudev rename to services/eudev diff --git a/services/fcgiwrap b/services/fcgiwrap new file mode 100755 index 0000000..9535776 --- /dev/null +++ b/services/fcgiwrap @@ -0,0 +1,5 @@ +#!/usr/bin/env ssm +# The configuration is in conf.d. + +#service_respawn='true' +service_command=( /usr/bin/spawn-fcgi -s "$cfg_socket" -P "$service_pidfile" -u "$cfg_user" -g "$cfg_group" -- /usr/bin/fcgiwrap ) diff --git a/services/ferm b/services/ferm new file mode 100755 index 0000000..21e568e --- /dev/null +++ b/services/ferm @@ -0,0 +1,6 @@ +#!/usr/bin/env ssm + +service_type='oneshot' +service_command=( /usr/bin/ferm /etc/ferm.conf ) + +reload() { "${service_command[@]}"; } diff --git a/init.d/fsck b/services/fsck similarity index 100% rename from init.d/fsck rename to services/fsck diff --git a/services/haproxy b/services/haproxy new file mode 100755 index 0000000..d24b7de --- /dev/null +++ b/services/haproxy @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn=true +service_command=( /usr/bin/haproxy -db -f /etc/haproxy/haproxy.cfg ) diff --git a/services/haveged b/services/haveged new file mode 100755 index 0000000..e1bdfcb --- /dev/null +++ b/services/haveged @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/haveged -F -w 1024 -v 1 ) diff --git a/init.d/hostname b/services/hostname similarity index 74% rename from init.d/hostname rename to services/hostname index 081370f..2e86383 100644 --- a/init.d/hostname +++ b/services/hostname @@ -8,5 +8,4 @@ fi [[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; } service_type='oneshot' -service_command='/usr/bin/hostname' -service_args=( "$cfg_hostname" ) +service_command=( /usr/bin/hostname "$cfg_hostname" ) diff --git a/init.d/hwdetect b/services/hwdetect similarity index 100% rename from init.d/hwdetect rename to services/hwdetect diff --git a/init.d/iptables b/services/iptables similarity index 100% rename from init.d/iptables rename to services/iptables diff --git a/init.d/isc-dhcpd b/services/isc-dhcpd similarity index 57% rename from init.d/isc-dhcpd rename to services/isc-dhcpd index 3f8ae39..7a8a1a1 100755 --- a/init.d/isc-dhcpd +++ b/services/isc-dhcpd @@ -2,5 +2,4 @@ # dhcp client daemon initscript #service_respawn=true -service_command='/usr/sbin/dhcpd' -service_args=( -f ) +service_command=( /usr/sbin/dhcpd -f ) diff --git a/init.d/kmscon b/services/kmscon similarity index 76% rename from init.d/kmscon rename to services/kmscon index f357ed6..6d23784 100755 --- a/init.d/kmscon +++ b/services/kmscon @@ -3,8 +3,8 @@ tty="${service_name##*-}" service_respawn='true' -service_command='/usr/bin/kmscon' -service_args=( +service_command=( + '/usr/bin/kmscon' --vt "$tty" --hwaccel --drm --font-name "$kmscon_font_name" diff --git a/init.d/kmscon-tty1 b/services/kmscon-tty1 similarity index 100% rename from init.d/kmscon-tty1 rename to services/kmscon-tty1 diff --git a/init.d/kmscon-tty2 b/services/kmscon-tty2 similarity index 100% rename from init.d/kmscon-tty2 rename to services/kmscon-tty2 diff --git a/init.d/kmscon-tty3 b/services/kmscon-tty3 similarity index 100% rename from init.d/kmscon-tty3 rename to services/kmscon-tty3 diff --git a/init.d/kmscon-tty4 b/services/kmscon-tty4 similarity index 100% rename from init.d/kmscon-tty4 rename to services/kmscon-tty4 diff --git a/init.d/kmscon-tty5 b/services/kmscon-tty5 similarity index 100% rename from init.d/kmscon-tty5 rename to services/kmscon-tty5 diff --git a/init.d/kmscon-tty6 b/services/kmscon-tty6 similarity index 100% rename from init.d/kmscon-tty6 rename to services/kmscon-tty6 diff --git a/init.d/libvirtd b/services/libvirtd similarity index 100% rename from init.d/libvirtd rename to services/libvirtd diff --git a/init.d/lo.iface b/services/lo.iface similarity index 80% rename from init.d/lo.iface rename to services/lo.iface index ae5ea77..f711217 100755 --- a/init.d/lo.iface +++ b/services/lo.iface @@ -3,8 +3,7 @@ cfg_iface="${service_name%%.*}" service_type='oneshot' -service_command='/usr/bin/ip' -service_args=( link set "$cfg_iface" up) +service_command=( /usr/bin/ip link set "$cfg_iface" up ) ready() { local iface="$1" timer='0' timeout='6' diff --git a/services/mariadb b/services/mariadb new file mode 100755 index 0000000..91878e2 --- /dev/null +++ b/services/mariadb @@ -0,0 +1,5 @@ +#!/usr/bin/env ssm + +#service_respawn='true' +service_workdir='/usr' +service_command=( /usr/bin/mysqld_safe --datadir=/var/lib/mysql ) diff --git a/init.d/mdev b/services/mdev similarity index 71% rename from init.d/mdev rename to services/mdev index fcfe7eb..0829114 100755 --- a/init.d/mdev +++ b/services/mdev @@ -1,8 +1,7 @@ #!/usr/bin/env ssm service_type='oneshot' -service_command='/usr/bin/mdev' -service_args=( -s ) +service_command=( /usr/bin/mdev -s ) post_start() { echo "Enabling hotplug..." diff --git a/services/memcached b/services/memcached new file mode 100755 index 0000000..f11a0b9 --- /dev/null +++ b/services/memcached @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1 ) diff --git a/init.d/motd b/services/motd similarity index 100% rename from init.d/motd rename to services/motd diff --git a/init.d/mount b/services/mount similarity index 100% rename from init.d/mount rename to services/mount diff --git a/services/mpd b/services/mpd new file mode 100755 index 0000000..fa4e8cf --- /dev/null +++ b/services/mpd @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn=true +service_command=( /usr/bin/mpd --no-daemon ) diff --git a/init.d/ngetty b/services/ngetty similarity index 100% rename from init.d/ngetty rename to services/ngetty diff --git a/init.d/nginx b/services/nginx similarity index 100% rename from init.d/nginx rename to services/nginx diff --git a/init.d/nrpe b/services/nrpe similarity index 60% rename from init.d/nrpe rename to services/nrpe index 79d90e8..afe6ac4 100755 --- a/init.d/nrpe +++ b/services/nrpe @@ -3,6 +3,5 @@ cfg_nrpe_config='/etc/nrpe/nrpe.cfg' #service_respawn=true -service_command='/usr/bin/nrpe' +service_command=( /usr/bin/nrpe -c "$cfg_nrpe_config" -d ) service_pidfile='/run/nrpe.pid' -service_args=( -c "$cfg_nrpe_config" -d ) diff --git a/services/ntp b/services/ntp new file mode 100755 index 0000000..5964a8e --- /dev/null +++ b/services/ntp @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/ntpd -n ) diff --git a/services/oidentd b/services/oidentd new file mode 100755 index 0000000..32d576c --- /dev/null +++ b/services/oidentd @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/oidentd -i ) diff --git a/services/openntpd b/services/openntpd new file mode 100755 index 0000000..8af4312 --- /dev/null +++ b/services/openntpd @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/ntpd -d ) diff --git a/init.d/openvpn b/services/openvpn similarity index 68% rename from init.d/openvpn rename to services/openvpn index 782f3f2..288df85 100755 --- a/init.d/openvpn +++ b/services/openvpn @@ -3,6 +3,5 @@ cfg_ovpn_instance="${service_name##*-}" service_respawn='true' -service_command="/usr/bin/openvpn" +service_command=( /usr/bin/openvpn client.cfg ) service_workdir="/etc/openvpn/$cfg_ovpn_instance" -service_args=( client.cfg ) diff --git a/init.d/openvpn-example b/services/openvpn-example similarity index 100% rename from init.d/openvpn-example rename to services/openvpn-example diff --git a/services/openvpn-server b/services/openvpn-server new file mode 100755 index 0000000..f18164b --- /dev/null +++ b/services/openvpn-server @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +service_workdir="/etc/openvpn" +service_command=( /usr/sbin/openvpn server.conf ) diff --git a/services/pamusb b/services/pamusb new file mode 100755 index 0000000..edb0336 --- /dev/null +++ b/services/pamusb @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +service_type='oneshot' +service_command=( /usr/bin/mkdir -p /run/lock ) diff --git a/services/php-fpm b/services/php-fpm new file mode 100755 index 0000000..4f7f568 --- /dev/null +++ b/services/php-fpm @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/php-fpm -F --fpm-config /etc/php/php-fpm.conf -c /etc/php/php.ini ) diff --git a/services/preload b/services/preload new file mode 100755 index 0000000..4b1225e --- /dev/null +++ b/services/preload @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn='true' +service_command=( /usr/bin/preload -f ) diff --git a/services/privoxy b/services/privoxy new file mode 100755 index 0000000..3aa355d --- /dev/null +++ b/services/privoxy @@ -0,0 +1,10 @@ +#!/usr/bin/env ssm + +privoxy_username='privoxy' +privoxy_configfile='/etc/privoxy/config' + +service_command=( /usr/bin/privoxy --no-daemon --user "$privoxy_username" "$privoxy_configfile" ) + +pre_restart() { + "$service_command" --config-test "$privoxy_configfile" +} diff --git a/init.d/prosody b/services/prosody similarity index 100% rename from init.d/prosody rename to services/prosody diff --git a/init.d/rc.local b/services/rc.local similarity index 100% rename from init.d/rc.local rename to services/rc.local diff --git a/init.d/rsyslogd b/services/rsyslogd similarity index 53% rename from init.d/rsyslogd rename to services/rsyslogd index f703659..9f86e4e 100755 --- a/init.d/rsyslogd +++ b/services/rsyslogd @@ -2,5 +2,4 @@ # Author: Alad Wenter #service_respawn=true -service_command='/usr/bin/rsyslogd' -service_args=( -n ) +service_command=( /usr/bin/rsyslogd -n ) diff --git a/services/scron b/services/scron new file mode 100755 index 0000000..017f18f --- /dev/null +++ b/services/scron @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn='true' +service_command=( /usr/bin/crond -n ) diff --git a/init.d/sdhcp b/services/sdhcp similarity index 100% rename from init.d/sdhcp rename to services/sdhcp diff --git a/init.d/smdev b/services/smdev similarity index 71% rename from init.d/smdev rename to services/smdev index 9a17c34..1d73e4a 100755 --- a/init.d/smdev +++ b/services/smdev @@ -1,8 +1,7 @@ #!/usr/bin/env ssm service_type='oneshot' -service_command='/usr/bin/smdev' -service_args=( -s ) +service_command=( /usr/bin/smdev -s ) post_start() { echo "Enabling hotplug..." diff --git a/init.d/sshd b/services/sshd similarity index 67% rename from init.d/sshd rename to services/sshd index fd28b87..3d80149 100755 --- a/init.d/sshd +++ b/services/sshd @@ -3,8 +3,7 @@ cfg_sshd_cfgdir='/etc/ssh' service_respawn=true -service_command='/usr/bin/sshd' -service_args=( -D -f "$cfg_sshd_cfgdir/sshd_config" ) +service_command=( /usr/bin/sshd -D -f "$cfg_sshd_cfgdir/sshd_config" ) depends_ready=( znet ) diff --git a/init.d/sysctl b/services/sysctl similarity index 81% rename from init.d/sysctl rename to services/sysctl index 006c396..07a1801 100755 --- a/init.d/sysctl +++ b/services/sysctl @@ -11,5 +11,5 @@ pre_start() { } done - service_args=( -p "${sysctl_config_files[@]}" ) + service_command+=( -p "${sysctl_config_files[@]}" ) } diff --git a/services/syslog-ng b/services/syslog-ng new file mode 100755 index 0000000..05d2eb1 --- /dev/null +++ b/services/syslog-ng @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn=true +service_command=( /usr/bin/syslog-ng -F ) diff --git a/init.d/systemd-udevd b/services/systemd-udevd similarity index 100% rename from init.d/systemd-udevd rename to services/systemd-udevd diff --git a/init.d/tinc b/services/tinc similarity index 52% rename from init.d/tinc rename to services/tinc index 3f38236..85f2c03 100755 --- a/init.d/tinc +++ b/services/tinc @@ -3,5 +3,4 @@ instance="${service_name##*-}" service_respawn='true' -service_command="/usr/bin/tincd" -service_args=( -D -n "$instance" ) +service_command=( /usr/bin/tincd -D -n "$instance" ) diff --git a/init.d/unbound b/services/unbound similarity index 100% rename from init.d/unbound rename to services/unbound diff --git a/init.d/userrc b/services/userrc similarity index 100% rename from init.d/userrc rename to services/userrc diff --git a/init.d/vdevd b/services/vdevd similarity index 83% rename from init.d/vdevd rename to services/vdevd index 8a60a5c..569fc21 100755 --- a/init.d/vdevd +++ b/services/vdevd @@ -1,8 +1,7 @@ #!/usr/bin/env ssm #service_respawn='true' -service_command='/usr/bin/vdevd' -service_args=( -f /dev ) +service_command=( /usr/bin/vdevd -f /dev ) service_tmpfiles=( '/run/vdev:dir' '/run/udev:symlink:/dev/metadata/udev' ) pre_start() { diff --git a/services/vixie-cron b/services/vixie-cron new file mode 100755 index 0000000..8e01d83 --- /dev/null +++ b/services/vixie-cron @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +#service_respawn='true' +service_command=( /usr/bin/crond -f ) diff --git a/services/wpa_supplicant b/services/wpa_supplicant new file mode 100755 index 0000000..f474d06 --- /dev/null +++ b/services/wpa_supplicant @@ -0,0 +1,4 @@ +#!/usr/bin/env ssm + +service_config='/etc/wpa_supplicant/wpa_supplicant.conf' +service_command=( /usr/bin/wpa_supplicant -i "${service_name##*-}" -c "$service_config" ) diff --git a/services/xinetd b/services/xinetd new file mode 100755 index 0000000..57b2935 --- /dev/null +++ b/services/xinetd @@ -0,0 +1,3 @@ +#!/usr/bin/env ssm + +service_command=( /usr/bin/xinetd -dontfork ) diff --git a/init.d/zt b/services/zt similarity index 100% rename from init.d/zt rename to services/zt