From 668b2c1d196aea04c7d129537ef6554c8fb8d84b Mon Sep 17 00:00:00 2001 From: fbt Date: Sat, 2 Aug 2014 21:35:27 +0400 Subject: [PATCH] Let's only respawn the services that might need it --- init.d/agetty | 2 +- init.d/agetty-tty1 | 6 +++++- init.d/agetty-tty2 | 6 +++++- init.d/agetty-tty3 | 6 +++++- init.d/agetty-tty4 | 6 +++++- init.d/agetty-tty5 | 6 +++++- init.d/agetty-tty6 | 6 +++++- init.d/alsa | 2 +- init.d/bitflu | 2 +- init.d/cjdroute | 2 +- init.d/crond | 2 +- init.d/cupsd | 2 +- init.d/dbus | 2 +- init.d/dhcpcd | 2 +- init.d/dnscrypt | 2 +- init.d/dnscrypt-backup | 2 +- init.d/docker | 2 +- init.d/eudev | 2 +- init.d/fcgiwrap | 2 +- init.d/kmscon-tty1 | 8 +++++++- init.d/kmscon-tty2 | 8 +++++++- init.d/kmscon-tty3 | 8 +++++++- init.d/kmscon-tty4 | 8 +++++++- init.d/kmscon-tty5 | 8 +++++++- init.d/kmscon-tty6 | 8 +++++++- init.d/mpd | 2 +- init.d/nginx | 1 - init.d/nrpe | 2 +- init.d/ntp | 2 +- init.d/openntpd | 2 +- init.d/openvpn-mh | 7 ------- init.d/preload | 2 +- init.d/privoxy | 2 +- init.d/syslog-ng | 2 +- init.d/systemd-udevd | 2 +- init.d/xinetd | 2 +- 36 files changed, 94 insertions(+), 42 deletions(-) mode change 120000 => 100755 init.d/agetty-tty1 mode change 120000 => 100755 init.d/agetty-tty2 mode change 120000 => 100755 init.d/agetty-tty3 mode change 120000 => 100755 init.d/agetty-tty4 mode change 120000 => 100755 init.d/agetty-tty5 mode change 120000 => 100755 init.d/agetty-tty6 mode change 120000 => 100755 init.d/kmscon-tty1 mode change 120000 => 100755 init.d/kmscon-tty2 mode change 120000 => 100755 init.d/kmscon-tty3 mode change 120000 => 100755 init.d/kmscon-tty4 mode change 120000 => 100755 init.d/kmscon-tty5 mode change 120000 => 100755 init.d/kmscon-tty6 delete mode 100755 init.d/openvpn-mh diff --git a/init.d/agetty b/init.d/agetty index 45a4bea..43a7cc4 100755 --- a/init.d/agetty +++ b/init.d/agetty @@ -1,5 +1,5 @@ #!/usr/bin/env watchman +service_respawn='true' service_command='/bin/agetty' service_args="38400 ${service_name##*-} linux" -service_respawn='true' diff --git a/init.d/agetty-tty1 b/init.d/agetty-tty1 deleted file mode 120000 index a1abdb2..0000000 --- a/init.d/agetty-tty1 +++ /dev/null @@ -1 +0,0 @@ -agetty \ No newline at end of file diff --git a/init.d/agetty-tty1 b/init.d/agetty-tty1 new file mode 100755 index 0000000..4cf75a1 --- /dev/null +++ b/init.d/agetty-tty1 @@ -0,0 +1,5 @@ +#!/usr/bin/env watchman + +service_command='/bin/agetty' +service_args="38400 ${service_name##*-} linux" +#service_respawn='true' diff --git a/init.d/agetty-tty2 b/init.d/agetty-tty2 deleted file mode 120000 index a1abdb2..0000000 --- a/init.d/agetty-tty2 +++ /dev/null @@ -1 +0,0 @@ -agetty \ No newline at end of file diff --git a/init.d/agetty-tty2 b/init.d/agetty-tty2 new file mode 100755 index 0000000..4cf75a1 --- /dev/null +++ b/init.d/agetty-tty2 @@ -0,0 +1,5 @@ +#!/usr/bin/env watchman + +service_command='/bin/agetty' +service_args="38400 ${service_name##*-} linux" +#service_respawn='true' diff --git a/init.d/agetty-tty3 b/init.d/agetty-tty3 deleted file mode 120000 index a1abdb2..0000000 --- a/init.d/agetty-tty3 +++ /dev/null @@ -1 +0,0 @@ -agetty \ No newline at end of file diff --git a/init.d/agetty-tty3 b/init.d/agetty-tty3 new file mode 100755 index 0000000..4cf75a1 --- /dev/null +++ b/init.d/agetty-tty3 @@ -0,0 +1,5 @@ +#!/usr/bin/env watchman + +service_command='/bin/agetty' +service_args="38400 ${service_name##*-} linux" +#service_respawn='true' diff --git a/init.d/agetty-tty4 b/init.d/agetty-tty4 deleted file mode 120000 index a1abdb2..0000000 --- a/init.d/agetty-tty4 +++ /dev/null @@ -1 +0,0 @@ -agetty \ No newline at end of file diff --git a/init.d/agetty-tty4 b/init.d/agetty-tty4 new file mode 100755 index 0000000..4cf75a1 --- /dev/null +++ b/init.d/agetty-tty4 @@ -0,0 +1,5 @@ +#!/usr/bin/env watchman + +service_command='/bin/agetty' +service_args="38400 ${service_name##*-} linux" +#service_respawn='true' diff --git a/init.d/agetty-tty5 b/init.d/agetty-tty5 deleted file mode 120000 index a1abdb2..0000000 --- a/init.d/agetty-tty5 +++ /dev/null @@ -1 +0,0 @@ -agetty \ No newline at end of file diff --git a/init.d/agetty-tty5 b/init.d/agetty-tty5 new file mode 100755 index 0000000..4cf75a1 --- /dev/null +++ b/init.d/agetty-tty5 @@ -0,0 +1,5 @@ +#!/usr/bin/env watchman + +service_command='/bin/agetty' +service_args="38400 ${service_name##*-} linux" +#service_respawn='true' diff --git a/init.d/agetty-tty6 b/init.d/agetty-tty6 deleted file mode 120000 index a1abdb2..0000000 --- a/init.d/agetty-tty6 +++ /dev/null @@ -1 +0,0 @@ -agetty \ No newline at end of file diff --git a/init.d/agetty-tty6 b/init.d/agetty-tty6 new file mode 100755 index 0000000..4cf75a1 --- /dev/null +++ b/init.d/agetty-tty6 @@ -0,0 +1,5 @@ +#!/usr/bin/env watchman + +service_command='/bin/agetty' +service_args="38400 ${service_name##*-} linux" +#service_respawn='true' diff --git a/init.d/alsa b/init.d/alsa index 2d029c8..21e44c2 100755 --- a/init.d/alsa +++ b/init.d/alsa @@ -1,6 +1,6 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/bin/alsactl' service_args="rdaemon" diff --git a/init.d/bitflu b/init.d/bitflu index 08302ff..c8f56a2 100755 --- a/init.d/bitflu +++ b/init.d/bitflu @@ -1,6 +1,6 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_username='torrent' service_command='sudo' service_args="-u $service_username -- /usr/bin/bitflu --config=/etc/bitflu.cfg" diff --git a/init.d/cjdroute b/init.d/cjdroute index 9558a64..7d1f456 100755 --- a/init.d/cjdroute +++ b/init.d/cjdroute @@ -10,8 +10,8 @@ unset reload +service_respawn=true service_command='/usr/local/bin/run-cjdroute' -#service_respawn=true cjdroute_config='/etc/cjdroute.conf' cjdroute_admin_port='11234' diff --git a/init.d/crond b/init.d/crond index c5365b5..25a7e33 100755 --- a/init.d/crond +++ b/init.d/crond @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/bin/crond' service_args='-n' diff --git a/init.d/cupsd b/init.d/cupsd index 9e61f15..1b0736d 100755 --- a/init.d/cupsd +++ b/init.d/cupsd @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/bin/cupsd' service_args="-f" diff --git a/init.d/dbus b/init.d/dbus index 474a89a..5e092d7 100755 --- a/init.d/dbus +++ b/init.d/dbus @@ -1,6 +1,6 @@ #!/usr/bin/env watchman -service_respawn=true +#service_respawn=true service_command='/usr/bin/dbus-daemon' service_args='--system --nofork' diff --git a/init.d/dhcpcd b/init.d/dhcpcd index 10ae1a3..b3a0060 100755 --- a/init.d/dhcpcd +++ b/init.d/dhcpcd @@ -1,6 +1,6 @@ #!/usr/bin/env watchman # dhcp client daemon initscript -service_respawn=true +#service_respawn=true service_command='/usr/sbin/dhcpcd' service_args='-B' diff --git a/init.d/dnscrypt b/init.d/dnscrypt index e0dc576..d31133f 100644 --- a/init.d/dnscrypt +++ b/init.d/dnscrypt @@ -3,5 +3,5 @@ # soft depend, OR return 1 for hard depend depends dnscrypt-backup -service_respawn='true' +#service_respawn='true' service_command='/usr/bin/dnscrypt-proxy' diff --git a/init.d/dnscrypt-backup b/init.d/dnscrypt-backup index 15f47d2..90fcf17 100644 --- a/init.d/dnscrypt-backup +++ b/init.d/dnscrypt-backup @@ -1,4 +1,4 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/usr/bin/dnscrypt-proxy' diff --git a/init.d/docker b/init.d/docker index f25e9b4..41e6901 100755 --- a/init.d/docker +++ b/init.d/docker @@ -2,7 +2,7 @@ docker_dir='/home/docker' -service_respawn='true' +#service_respawn='true' service_command='/usr/local/sbin/docker' service_args="-g ${docker_dir} -d" diff --git a/init.d/eudev b/init.d/eudev index 19de506..77ea262 100755 --- a/init.d/eudev +++ b/init.d/eudev @@ -1,6 +1,6 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/usr/bin/udevd' cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}" diff --git a/init.d/fcgiwrap b/init.d/fcgiwrap index 0192170..b76d62c 100755 --- a/init.d/fcgiwrap +++ b/init.d/fcgiwrap @@ -1,5 +1,5 @@ #!/usr/bin/env watchman # The configuration is in conf.d. -service_respawn='true' +#service_respawn='true' service_command='/bin/spawn-fcgi' diff --git a/init.d/kmscon-tty1 b/init.d/kmscon-tty1 deleted file mode 120000 index 326ce6c..0000000 --- a/init.d/kmscon-tty1 +++ /dev/null @@ -1 +0,0 @@ -kmscon \ No newline at end of file diff --git a/init.d/kmscon-tty1 b/init.d/kmscon-tty1 new file mode 100755 index 0000000..e473f05 --- /dev/null +++ b/init.d/kmscon-tty1 @@ -0,0 +1,7 @@ +#!/usr/bin/env watchman + +tty=${service_name##*-}; + +#service_respawn='true' +service_command='/usr/bin/kmscon' +service_args="--vt ${tty}" diff --git a/init.d/kmscon-tty2 b/init.d/kmscon-tty2 deleted file mode 120000 index 326ce6c..0000000 --- a/init.d/kmscon-tty2 +++ /dev/null @@ -1 +0,0 @@ -kmscon \ No newline at end of file diff --git a/init.d/kmscon-tty2 b/init.d/kmscon-tty2 new file mode 100755 index 0000000..e473f05 --- /dev/null +++ b/init.d/kmscon-tty2 @@ -0,0 +1,7 @@ +#!/usr/bin/env watchman + +tty=${service_name##*-}; + +#service_respawn='true' +service_command='/usr/bin/kmscon' +service_args="--vt ${tty}" diff --git a/init.d/kmscon-tty3 b/init.d/kmscon-tty3 deleted file mode 120000 index 326ce6c..0000000 --- a/init.d/kmscon-tty3 +++ /dev/null @@ -1 +0,0 @@ -kmscon \ No newline at end of file diff --git a/init.d/kmscon-tty3 b/init.d/kmscon-tty3 new file mode 100755 index 0000000..e473f05 --- /dev/null +++ b/init.d/kmscon-tty3 @@ -0,0 +1,7 @@ +#!/usr/bin/env watchman + +tty=${service_name##*-}; + +#service_respawn='true' +service_command='/usr/bin/kmscon' +service_args="--vt ${tty}" diff --git a/init.d/kmscon-tty4 b/init.d/kmscon-tty4 deleted file mode 120000 index 326ce6c..0000000 --- a/init.d/kmscon-tty4 +++ /dev/null @@ -1 +0,0 @@ -kmscon \ No newline at end of file diff --git a/init.d/kmscon-tty4 b/init.d/kmscon-tty4 new file mode 100755 index 0000000..e473f05 --- /dev/null +++ b/init.d/kmscon-tty4 @@ -0,0 +1,7 @@ +#!/usr/bin/env watchman + +tty=${service_name##*-}; + +#service_respawn='true' +service_command='/usr/bin/kmscon' +service_args="--vt ${tty}" diff --git a/init.d/kmscon-tty5 b/init.d/kmscon-tty5 deleted file mode 120000 index 326ce6c..0000000 --- a/init.d/kmscon-tty5 +++ /dev/null @@ -1 +0,0 @@ -kmscon \ No newline at end of file diff --git a/init.d/kmscon-tty5 b/init.d/kmscon-tty5 new file mode 100755 index 0000000..e473f05 --- /dev/null +++ b/init.d/kmscon-tty5 @@ -0,0 +1,7 @@ +#!/usr/bin/env watchman + +tty=${service_name##*-}; + +#service_respawn='true' +service_command='/usr/bin/kmscon' +service_args="--vt ${tty}" diff --git a/init.d/kmscon-tty6 b/init.d/kmscon-tty6 deleted file mode 120000 index 326ce6c..0000000 --- a/init.d/kmscon-tty6 +++ /dev/null @@ -1 +0,0 @@ -kmscon \ No newline at end of file diff --git a/init.d/kmscon-tty6 b/init.d/kmscon-tty6 new file mode 100755 index 0000000..e473f05 --- /dev/null +++ b/init.d/kmscon-tty6 @@ -0,0 +1,7 @@ +#!/usr/bin/env watchman + +tty=${service_name##*-}; + +#service_respawn='true' +service_command='/usr/bin/kmscon' +service_args="--vt ${tty}" diff --git a/init.d/mpd b/init.d/mpd index fe61f0e..8c70b27 100755 --- a/init.d/mpd +++ b/init.d/mpd @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn=true +#service_respawn=true service_command='/bin/mpd' service_args='--no-daemon' diff --git a/init.d/nginx b/init.d/nginx index c9b8a39..08d18a9 100755 --- a/init.d/nginx +++ b/init.d/nginx @@ -1,6 +1,5 @@ #!/usr/bin/env watchman -service_respawn='true' service_command='/usr/bin/nginx' service_pidfile='/run/nginx.pid' diff --git a/init.d/nrpe b/init.d/nrpe index c2f5e90..0998eb0 100755 --- a/init.d/nrpe +++ b/init.d/nrpe @@ -2,7 +2,7 @@ cfg_nrpe_config='/etc/nrpe/nrpe.cfg' -service_respawn=true +#service_respawn=true service_command='/usr/bin/nrpe' service_pidfile='/run/nrpe.pid' service_args="-c ${cfg_nrpe_config} -d" diff --git a/init.d/ntp b/init.d/ntp index b018ea8..84bfd88 100644 --- a/init.d/ntp +++ b/init.d/ntp @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/bin/ntpd' service_args='-n' diff --git a/init.d/openntpd b/init.d/openntpd index d4de790..342127a 100755 --- a/init.d/openntpd +++ b/init.d/openntpd @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/bin/ntpd' service_args='-d' diff --git a/init.d/openvpn-mh b/init.d/openvpn-mh deleted file mode 100755 index ea0c0a1..0000000 --- a/init.d/openvpn-mh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/preload b/init.d/preload index 4b33022..82cf12d 100755 --- a/init.d/preload +++ b/init.d/preload @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/bin/preload' service_args='-f' diff --git a/init.d/privoxy b/init.d/privoxy index ad30ff1..780c339 100755 --- a/init.d/privoxy +++ b/init.d/privoxy @@ -3,7 +3,7 @@ privoxy_username='privoxy' privoxy_configfile='/etc/privoxy/config' -service_respawn='true' +#service_respawn='true' service_command='/usr/bin/privoxy' service_args="--no-daemon --user ${privoxy_username} ${privoxy_configfile}" diff --git a/init.d/syslog-ng b/init.d/syslog-ng index 7a604bd..e21dbea 100755 --- a/init.d/syslog-ng +++ b/init.d/syslog-ng @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn=true +#service_respawn=true service_command='/bin/syslog-ng' service_args='-F' diff --git a/init.d/systemd-udevd b/init.d/systemd-udevd index 3af498a..dc465ff 100755 --- a/init.d/systemd-udevd +++ b/init.d/systemd-udevd @@ -1,6 +1,6 @@ #!/usr/bin/env watchman -service_respawn='true' +#service_respawn='true' service_command='/usr/lib/systemd/systemd-udevd' cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}" diff --git a/init.d/xinetd b/init.d/xinetd index 53ad317..6fc41ce 100755 --- a/init.d/xinetd +++ b/init.d/xinetd @@ -1,5 +1,5 @@ #!/usr/bin/env watchman -service_respawn=true +#service_respawn=true service_command='/usr/bin/xinetd' service_args='-dontfork'