From d85b1945e9bf2eb88b9b9f3d758eee30624a8229 Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 10 Dec 2017 20:44:17 +0300 Subject: [PATCH] kek Signed-off-by: fbt --- conf.d/devfs-links | 8 -------- init.d/acpid | 5 ----- init.d/agetty | 5 ----- init.d/chef-client | 5 ----- init.d/chrony | 5 ----- init.d/connmand | 8 -------- init.d/cronie | 4 ---- init.d/cupsd | 5 ----- init.d/devfs-links | 18 ------------------ init.d/fcgiwrap | 6 ------ init.d/ferm | 9 --------- init.d/haproxy | 5 ----- init.d/haveged | 4 ---- init.d/mariadb | 6 ------ init.d/memcached | 5 ----- init.d/mpd | 5 ----- init.d/network | 10 ---------- init.d/ntp | 5 ----- init.d/oidentd | 4 ---- init.d/openntpd | 5 ----- init.d/openvpn-server | 6 ------ init.d/pamusb | 5 ----- init.d/php-fpm | 5 ----- init.d/preload | 5 ----- init.d/privoxy | 12 ------------ init.d/scron | 5 ----- init.d/syslog-ng | 5 ----- init.d/teamviewerd | 6 ------ init.d/vixie-cron | 5 ----- init.d/wpa_supplicant | 5 ----- init.d/xinetd | 5 ----- init.d/znet | 10 ---------- {init.d => services}/README | 0 services/acpid | 4 ++++ services/agetty | 4 ++++ {init.d => services}/agetty-tty1 | 0 {init.d => services}/agetty-tty2 | 0 {init.d => services}/agetty-tty3 | 0 {init.d => services}/agetty-tty4 | 0 {init.d => services}/agetty-tty5 | 0 {init.d => services}/agetty-tty6 | 0 {init.d => services}/alsa | 3 +-- {init.d => services}/atd | 0 {init.d => services}/binfmt-register | 0 {init.d => services}/bitlbee | 3 +-- {init.d => services}/cgmanager | 0 services/chef-client | 3 +++ services/chrony | 4 ++++ {init.d => services}/cjdroute | 0 services/connmand | 5 +++++ services/cronie | 3 +++ services/cupsd | 4 ++++ {init.d => services}/dbus | 3 +-- {init.d => services}/dhcpcd | 3 +-- {init.d => services}/dnscrypt | 4 ++-- {init.d => services}/dnscrypt-backup | 4 ++-- {init.d => services}/docker | 0 {init.d => services}/dropbear | 0 {init.d => services}/eth0.iface | 0 {init.d => services}/eudev | 0 services/fcgiwrap | 5 +++++ services/ferm | 6 ++++++ {init.d => services}/fsck | 0 services/haproxy | 4 ++++ services/haveged | 3 +++ {init.d => services}/hostname | 3 +-- {init.d => services}/hwdetect | 0 {init.d => services}/iptables | 0 {init.d => services}/isc-dhcpd | 3 +-- {init.d => services}/kmscon | 4 ++-- {init.d => services}/kmscon-tty1 | 0 {init.d => services}/kmscon-tty2 | 0 {init.d => services}/kmscon-tty3 | 0 {init.d => services}/kmscon-tty4 | 0 {init.d => services}/kmscon-tty5 | 0 {init.d => services}/kmscon-tty6 | 0 {init.d => services}/libvirtd | 0 {init.d => services}/lo.iface | 3 +-- services/mariadb | 5 +++++ {init.d => services}/mdev | 3 +-- services/memcached | 3 +++ {init.d => services}/motd | 0 {init.d => services}/mount | 0 services/mpd | 4 ++++ {init.d => services}/ngetty | 0 {init.d => services}/nginx | 0 {init.d => services}/nrpe | 3 +-- services/ntp | 3 +++ services/oidentd | 3 +++ services/openntpd | 3 +++ {init.d => services}/openvpn | 3 +-- {init.d => services}/openvpn-example | 0 services/openvpn-server | 4 ++++ services/pamusb | 4 ++++ services/php-fpm | 3 +++ services/preload | 4 ++++ services/privoxy | 10 ++++++++++ {init.d => services}/prosody | 0 {init.d => services}/rc.local | 0 {init.d => services}/rsyslogd | 3 +-- services/scron | 4 ++++ {init.d => services}/sdhcp | 0 {init.d => services}/smdev | 3 +-- {init.d => services}/sshd | 3 +-- {init.d => services}/sysctl | 2 +- services/syslog-ng | 4 ++++ {init.d => services}/systemd-udevd | 0 {init.d => services}/tinc | 3 +-- {init.d => services}/unbound | 0 {init.d => services}/userrc | 0 {init.d => services}/vdevd | 3 +-- services/vixie-cron | 4 ++++ services/wpa_supplicant | 4 ++++ services/xinetd | 3 +++ {init.d => services}/zt | 0 115 files changed, 132 insertions(+), 238 deletions(-) delete mode 100644 conf.d/devfs-links delete mode 100755 init.d/acpid delete mode 100755 init.d/agetty delete mode 100755 init.d/chef-client delete mode 100755 init.d/chrony delete mode 100755 init.d/connmand delete mode 100755 init.d/cronie delete mode 100755 init.d/cupsd delete mode 100755 init.d/devfs-links delete mode 100755 init.d/fcgiwrap delete mode 100755 init.d/ferm delete mode 100755 init.d/haproxy delete mode 100755 init.d/haveged delete mode 100755 init.d/mariadb delete mode 100755 init.d/memcached delete mode 100755 init.d/mpd delete mode 100755 init.d/network delete mode 100755 init.d/ntp delete mode 100755 init.d/oidentd delete mode 100755 init.d/openntpd delete mode 100755 init.d/openvpn-server delete mode 100755 init.d/pamusb delete mode 100755 init.d/php-fpm delete mode 100755 init.d/preload delete mode 100755 init.d/privoxy delete mode 100755 init.d/scron delete mode 100755 init.d/syslog-ng delete mode 100755 init.d/teamviewerd delete mode 100755 init.d/vixie-cron delete mode 100755 init.d/wpa_supplicant delete mode 100755 init.d/xinetd delete mode 100755 init.d/znet rename {init.d => services}/README (100%) create mode 100755 services/acpid create mode 100755 services/agetty rename {init.d => services}/agetty-tty1 (100%) rename {init.d => services}/agetty-tty2 (100%) rename {init.d => services}/agetty-tty3 (100%) rename {init.d => services}/agetty-tty4 (100%) rename {init.d => services}/agetty-tty5 (100%) rename {init.d => services}/agetty-tty6 (100%) rename {init.d => services}/alsa (61%) rename {init.d => services}/atd (100%) rename {init.d => services}/binfmt-register (100%) rename {init.d => services}/bitlbee (67%) rename {init.d => services}/cgmanager (100%) create mode 100755 services/chef-client create mode 100755 services/chrony rename {init.d => services}/cjdroute (100%) create mode 100755 services/connmand create mode 100755 services/cronie create mode 100755 services/cupsd rename {init.d => services}/dbus (66%) rename {init.d => services}/dhcpcd (57%) rename {init.d => services}/dnscrypt (84%) rename {init.d => services}/dnscrypt-backup (80%) rename {init.d => services}/docker (100%) rename {init.d => services}/dropbear (100%) rename {init.d => services}/eth0.iface (100%) rename {init.d => services}/eudev (100%) create mode 100755 services/fcgiwrap create mode 100755 services/ferm rename {init.d => services}/fsck (100%) create mode 100755 services/haproxy create mode 100755 services/haveged rename {init.d => services}/hostname (74%) rename {init.d => services}/hwdetect (100%) rename {init.d => services}/iptables (100%) rename {init.d => services}/isc-dhcpd (57%) rename {init.d => services}/kmscon (76%) rename {init.d => services}/kmscon-tty1 (100%) rename {init.d => services}/kmscon-tty2 (100%) rename {init.d => services}/kmscon-tty3 (100%) rename {init.d => services}/kmscon-tty4 (100%) rename {init.d => services}/kmscon-tty5 (100%) rename {init.d => services}/kmscon-tty6 (100%) rename {init.d => services}/libvirtd (100%) rename {init.d => services}/lo.iface (80%) create mode 100755 services/mariadb rename {init.d => services}/mdev (71%) create mode 100755 services/memcached rename {init.d => services}/motd (100%) rename {init.d => services}/mount (100%) create mode 100755 services/mpd rename {init.d => services}/ngetty (100%) rename {init.d => services}/nginx (100%) rename {init.d => services}/nrpe (60%) create mode 100755 services/ntp create mode 100755 services/oidentd create mode 100755 services/openntpd rename {init.d => services}/openvpn (68%) rename {init.d => services}/openvpn-example (100%) create mode 100755 services/openvpn-server create mode 100755 services/pamusb create mode 100755 services/php-fpm create mode 100755 services/preload create mode 100755 services/privoxy rename {init.d => services}/prosody (100%) rename {init.d => services}/rc.local (100%) rename {init.d => services}/rsyslogd (53%) create mode 100755 services/scron rename {init.d => services}/sdhcp (100%) rename {init.d => services}/smdev (71%) rename {init.d => services}/sshd (67%) rename {init.d => services}/sysctl (81%) create mode 100755 services/syslog-ng rename {init.d => services}/systemd-udevd (100%) rename {init.d => services}/tinc (52%) rename {init.d => services}/unbound (100%) rename {init.d => services}/userrc (100%) rename {init.d => services}/vdevd (83%) create mode 100755 services/vixie-cron create mode 100755 services/wpa_supplicant create mode 100755 services/xinetd rename {init.d => services}/zt (100%) 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