From eea04dff9523b07e4c3db557c40dea4d10f54296 Mon Sep 17 00:00:00 2001 From: fbt Date: Thu, 8 Mar 2018 02:34:49 +0300 Subject: [PATCH] Be more conservative about respawn Signed-off-by: fbt --- services/acpid | 1 - services/agetty | 1 - services/alsa | 1 - services/atd | 2 +- services/bitlbee | 1 - services/chrony | 2 +- services/cupsd | 1 - services/dbus | 1 - services/dhcpcd | 1 - services/dnscrypt | 1 - services/dnscrypt-backup | 1 - services/docker | 1 - services/dropbear | 2 +- services/eudev | 1 - services/fcgiwrap | 1 - services/haproxy | 1 - services/isc-dhcpd | 1 - services/kmscon | 2 +- services/libvirtd | 1 - services/mariadb | 1 - services/mpd | 1 - services/ngetty | 2 +- services/nginx | 2 +- services/nrpe | 1 - services/openvpn | 2 +- services/preload | 1 - services/rsyslogd | 2 +- services/scron | 2 +- services/sshd | 2 +- services/syslog-ng | 2 +- services/systemd-udevd | 1 - services/tinc | 2 +- services/unbound | 2 +- services/vdevd | 2 +- services/vixie-cron | 2 +- 35 files changed, 15 insertions(+), 35 deletions(-) diff --git a/services/acpid b/services/acpid index 9f3376c..d8e4a50 100755 --- a/services/acpid +++ b/services/acpid @@ -1,4 +1,3 @@ #!/usr/bin/env ssm -service_respawn='true' service_command=( /usr/bin/acpid -f ) diff --git a/services/agetty b/services/agetty index fcd3583..6a83e7b 100755 --- a/services/agetty +++ b/services/agetty @@ -1,4 +1,3 @@ #!/usr/bin/env ssm -service_respawn='true' service_command=( /usr/bin/agetty 38400 "${service_name##*-}" linux ) diff --git a/services/alsa b/services/alsa index 020a05f..47384df 100755 --- a/services/alsa +++ b/services/alsa @@ -1,6 +1,5 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command=( /usr/bin/alsactl rdaemon ) stop() { diff --git a/services/atd b/services/atd index 24a83b9..e07266e 100644 --- a/services/atd +++ b/services/atd @@ -1,4 +1,4 @@ #!/usr/bin/env ssm -service_respawn=true +service_respawn=always service_command=( /usr/bin/atd -f ) diff --git a/services/bitlbee b/services/bitlbee index 2697c45..e517eb8 100755 --- a/services/bitlbee +++ b/services/bitlbee @@ -2,5 +2,4 @@ # This script is intended for Daemon mode. # Modify it for your setup. -#service_respawn=true service_command=( /usr/bin/bitlbee -n ) diff --git a/services/chrony b/services/chrony index 693db2f..0e9d726 100755 --- a/services/chrony +++ b/services/chrony @@ -1,4 +1,4 @@ #!/usr/bin/env ssm -#service_respawn='true' +service_respawn=always service_command=( /usr/bin/chronyd -u chrony ) diff --git a/services/cupsd b/services/cupsd index 3434bec..ddb5af2 100755 --- a/services/cupsd +++ b/services/cupsd @@ -1,4 +1,3 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command=( /usr/bin/cupsd -f ) diff --git a/services/dbus b/services/dbus index c20a73a..8a38995 100755 --- a/services/dbus +++ b/services/dbus @@ -1,6 +1,5 @@ #!/usr/bin/env ssm -#service_respawn=true service_command=( /usr/bin/dbus-daemon --system --nofork ) service_tmpfiles=( '/run/dbus:dir' ) diff --git a/services/dhcpcd b/services/dhcpcd index c5a2048..90308db 100755 --- a/services/dhcpcd +++ b/services/dhcpcd @@ -1,5 +1,4 @@ #!/usr/bin/env ssm # dhcp client daemon initscript -#service_respawn=true service_command=( /usr/bin/dhcpcd -B ) diff --git a/services/dnscrypt b/services/dnscrypt index 33a6743..2bfdcf3 100755 --- a/services/dnscrypt +++ b/services/dnscrypt @@ -3,7 +3,6 @@ # soft depend, OR return 1 for hard depend depends dnscrypt-backup -#service_respawn='true' service_command=( '/usr/bin/dnscrypt-proxy' "--local-address=${local_ip}:${local_port}" diff --git a/services/dnscrypt-backup b/services/dnscrypt-backup index 5eb2773..a229b1a 100755 --- a/services/dnscrypt-backup +++ b/services/dnscrypt-backup @@ -1,6 +1,5 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command=( '/usr/bin/dnscrypt-proxy' "--local-address=${local_ip}:${local_port}" diff --git a/services/docker b/services/docker index b0d70c7..e66b9ba 100755 --- a/services/docker +++ b/services/docker @@ -1,6 +1,5 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command=( '/usr/bin/dockerd' -s overlay2 ) update() { diff --git a/services/dropbear b/services/dropbear index ce95339..1f00224 100755 --- a/services/dropbear +++ b/services/dropbear @@ -1,4 +1,4 @@ #!/usr/bin/env ssm -service_respawn=true +service_respawn=always service_command='/usr/bin/dropbear' diff --git a/services/eudev b/services/eudev index f2cc8d9..5939bfa 100755 --- a/services/eudev +++ b/services/eudev @@ -1,6 +1,5 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command='/usr/bin/udevd' cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}" diff --git a/services/fcgiwrap b/services/fcgiwrap index 9535776..f995fb9 100755 --- a/services/fcgiwrap +++ b/services/fcgiwrap @@ -1,5 +1,4 @@ #!/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/haproxy b/services/haproxy index d24b7de..21b29f9 100755 --- a/services/haproxy +++ b/services/haproxy @@ -1,4 +1,3 @@ #!/usr/bin/env ssm -#service_respawn=true service_command=( /usr/bin/haproxy -db -f /etc/haproxy/haproxy.cfg ) diff --git a/services/isc-dhcpd b/services/isc-dhcpd index 7a8a1a1..5500c4f 100755 --- a/services/isc-dhcpd +++ b/services/isc-dhcpd @@ -1,5 +1,4 @@ #!/usr/bin/env ssm # dhcp client daemon initscript -#service_respawn=true service_command=( /usr/sbin/dhcpd -f ) diff --git a/services/kmscon b/services/kmscon index 6d23784..5df5969 100755 --- a/services/kmscon +++ b/services/kmscon @@ -2,7 +2,7 @@ tty="${service_name##*-}" -service_respawn='true' +service_respawn=always service_command=( '/usr/bin/kmscon' --vt "$tty" diff --git a/services/libvirtd b/services/libvirtd index 5820c76..d6b0ce6 100755 --- a/services/libvirtd +++ b/services/libvirtd @@ -1,4 +1,3 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command='/usr/bin/libvirtd' diff --git a/services/mariadb b/services/mariadb index 91878e2..6081128 100755 --- a/services/mariadb +++ b/services/mariadb @@ -1,5 +1,4 @@ #!/usr/bin/env ssm -#service_respawn='true' service_workdir='/usr' service_command=( /usr/bin/mysqld_safe --datadir=/var/lib/mysql ) diff --git a/services/mpd b/services/mpd index fa4e8cf..08402d3 100755 --- a/services/mpd +++ b/services/mpd @@ -1,4 +1,3 @@ #!/usr/bin/env ssm -#service_respawn=true service_command=( /usr/bin/mpd --no-daemon ) diff --git a/services/ngetty b/services/ngetty index 9a36eed..ee18e35 100755 --- a/services/ngetty +++ b/services/ngetty @@ -1,4 +1,4 @@ #!/usr/bin/env ssm -service_respawn='true' +service_respawn=always service_command='/usr/bin/ngetty' diff --git a/services/nginx b/services/nginx index 886b587..0830510 100755 --- a/services/nginx +++ b/services/nginx @@ -1,7 +1,7 @@ #!/usr/bin/env ssm # For respawn to work, set 'daemon no' in nginx.conf -#service_respawn='true' +#service_respawn=on-failure service_command='/usr/bin/nginx' service_pidfile='/run/nginx.pid' diff --git a/services/nrpe b/services/nrpe index afe6ac4..891fc3f 100755 --- a/services/nrpe +++ b/services/nrpe @@ -2,6 +2,5 @@ cfg_nrpe_config='/etc/nrpe/nrpe.cfg' -#service_respawn=true service_command=( /usr/bin/nrpe -c "$cfg_nrpe_config" -d ) service_pidfile='/run/nrpe.pid' diff --git a/services/openvpn b/services/openvpn index 288df85..bcce29f 100755 --- a/services/openvpn +++ b/services/openvpn @@ -2,6 +2,6 @@ cfg_ovpn_instance="${service_name##*-}" -service_respawn='true' +service_respawn=on-failure service_command=( /usr/bin/openvpn client.cfg ) service_workdir="/etc/openvpn/$cfg_ovpn_instance" diff --git a/services/preload b/services/preload index 4b1225e..103540e 100755 --- a/services/preload +++ b/services/preload @@ -1,4 +1,3 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command=( /usr/bin/preload -f ) diff --git a/services/rsyslogd b/services/rsyslogd index 9f86e4e..568f05d 100755 --- a/services/rsyslogd +++ b/services/rsyslogd @@ -1,5 +1,5 @@ #!/usr/bin/env ssm # Author: Alad Wenter -#service_respawn=true +service_respawn=always service_command=( /usr/bin/rsyslogd -n ) diff --git a/services/scron b/services/scron index 017f18f..2401f22 100755 --- a/services/scron +++ b/services/scron @@ -1,4 +1,4 @@ #!/usr/bin/env ssm -#service_respawn='true' +service_respawn=always service_command=( /usr/bin/crond -n ) diff --git a/services/sshd b/services/sshd index 3d80149..5e33956 100755 --- a/services/sshd +++ b/services/sshd @@ -2,7 +2,7 @@ cfg_sshd_cfgdir='/etc/ssh' -service_respawn=true +service_respawn=always service_command=( /usr/bin/sshd -D -f "$cfg_sshd_cfgdir/sshd_config" ) depends_ready=( znet ) diff --git a/services/syslog-ng b/services/syslog-ng index 05d2eb1..517a0dc 100755 --- a/services/syslog-ng +++ b/services/syslog-ng @@ -1,4 +1,4 @@ #!/usr/bin/env ssm -#service_respawn=true +sevice_respawn=always service_command=( /usr/bin/syslog-ng -F ) diff --git a/services/systemd-udevd b/services/systemd-udevd index c9cb8b3..1bc1cd4 100755 --- a/services/systemd-udevd +++ b/services/systemd-udevd @@ -1,6 +1,5 @@ #!/usr/bin/env ssm -#service_respawn='true' service_command='/usr/lib/systemd/systemd-udevd' cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}" diff --git a/services/tinc b/services/tinc index 85f2c03..15266ea 100755 --- a/services/tinc +++ b/services/tinc @@ -2,5 +2,5 @@ instance="${service_name##*-}" -service_respawn='true' +service_respawn=on-failure service_command=( /usr/bin/tincd -D -n "$instance" ) diff --git a/services/unbound b/services/unbound index 0d5ea6d..f3a1ada 100755 --- a/services/unbound +++ b/services/unbound @@ -1,6 +1,6 @@ #!/usr/bin/env ssm -#service_respawn='true' +service_respawn=on-failure service_command=( /usr/bin/unbound -d ) pre_reload() { diff --git a/services/vdevd b/services/vdevd index 569fc21..302ea78 100755 --- a/services/vdevd +++ b/services/vdevd @@ -1,6 +1,6 @@ #!/usr/bin/env ssm -#service_respawn='true' +service_respawn=on-failure service_command=( /usr/bin/vdevd -f /dev ) service_tmpfiles=( '/run/vdev:dir' '/run/udev:symlink:/dev/metadata/udev' ) diff --git a/services/vixie-cron b/services/vixie-cron index 8e01d83..5136711 100755 --- a/services/vixie-cron +++ b/services/vixie-cron @@ -1,4 +1,4 @@ #!/usr/bin/env ssm -#service_respawn='true' +service_respawn=always service_command=( /usr/bin/crond -f )