From dfbe59fbe3edfcf84bc2acd05a2b592a4ec94723 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 1 Oct 2023 20:49:14 +0200 Subject: [PATCH] scripts dutchification - batch 1 --- etc/rc.d/rc.avahidaemon | 6 ++---- etc/rc.d/rc.nfsd | 6 ++---- etc/rc.d/rc.nginx | 6 ++---- etc/rc.d/rc.ntpd | 6 ++---- etc/rc.d/rc.rpc | 6 ++---- etc/rc.d/rc.samba | 6 ++---- etc/rc.d/rc.sshd | 6 ++---- 7 files changed, 14 insertions(+), 28 deletions(-) diff --git a/etc/rc.d/rc.avahidaemon b/etc/rc.d/rc.avahidaemon index 8ef5089e4..660c4f486 100755 --- a/etc/rc.d/rc.avahidaemon +++ b/etc/rc.d/rc.avahidaemon @@ -98,10 +98,8 @@ avahid_reload(){ avahid_update(){ # 0 = update needed, 1 = no action - if avahid_running; then - if check && [[ "$(this allow-interfaces)" == "$BIND" ]]; then exit 1; else exit 0; fi - fi - exit 1 + if ! avahid_running; then exit 1; fi + if check && [[ "$(this allow-interfaces)" == "$BIND" ]]; then exit 1; else exit 0; fi } avahid_status(){ diff --git a/etc/rc.d/rc.nfsd b/etc/rc.d/rc.nfsd index 6a6beee91..3f99b239b 100755 --- a/etc/rc.d/rc.nfsd +++ b/etc/rc.d/rc.nfsd @@ -126,10 +126,8 @@ nfsd_reload(){ nfsd_update(){ # 0 = update needed, 1 = no action - if nfsd_running; then - if check && [[ "$(this)" == "-H ${BIND// / -H }" ]]; then exit 1; else exit 0; fi - fi - exit 1 + if ! nfsd_running; then exit 1; fi + if check && [[ "$(this)" == "-H ${BIND// / -H }" ]]; then exit 1; else exit 0; fi } case "$1" in diff --git a/etc/rc.d/rc.nginx b/etc/rc.d/rc.nginx index b4c5a4011..008c1bf5e 100755 --- a/etc/rc.d/rc.nginx +++ b/etc/rc.d/rc.nginx @@ -702,10 +702,8 @@ nginx_renew(){ nginx_update(){ # 0 = update needed, 1 = no action - if nginx_running; then - if check && [[ "$(this)" == "$BIND" ]]; then exit 1; else exit 0; fi - fi - exit 1 + if ! nginx_running; then exit 1; fi + if check && [[ "$(this)" == "$BIND" ]]; then exit 1; else exit 0; fi } nginx_upgrade(){ diff --git a/etc/rc.d/rc.ntpd b/etc/rc.d/rc.ntpd index 7184e2ab4..3a2479dfe 100755 --- a/etc/rc.d/rc.ntpd +++ b/etc/rc.d/rc.ntpd @@ -98,10 +98,8 @@ ntpd_reload(){ ntpd_update(){ # 0 = update needed, 1 = no action - if ntpd_running; then - if check && [[ "$(this 'interface listen')" == "$BIND" ]]; then exit 1; else exit 0; fi - fi - exit 1 + if ! ntpd_running; then exit 1; fi + if check && [[ "$(this 'interface listen')" == "$BIND" ]]; then exit 1; else exit 0; fi } ntpd_status(){ diff --git a/etc/rc.d/rc.rpc b/etc/rc.d/rc.rpc index 7cf3b8974..82de8fd39 100755 --- a/etc/rc.d/rc.rpc +++ b/etc/rc.d/rc.rpc @@ -103,10 +103,8 @@ rpc_reload(){ rpc_update(){ # 0 = update needed, 1 = no action - if rpc_running; then - if check && [[ "$(this)" == "-h ${BIND// / -h }" ]]; then exit 1; else exit 0; fi - fi - exit 1 + if ! rpc_running; then exit 1; fi + if check && [[ "$(this)" == "-h ${BIND// / -h }" ]]; then exit 1; else exit 0; fi } case "$1" in diff --git a/etc/rc.d/rc.samba b/etc/rc.d/rc.samba index 2161d6c72..e5039f4c6 100755 --- a/etc/rc.d/rc.samba +++ b/etc/rc.d/rc.samba @@ -168,10 +168,8 @@ samba_reload(){ samba_update(){ # 0 = update needed, 1 = no action - if samba_running; then - if check && [[ "$(this interfaces)" == "$BIND" ]]; then exit 1; else exit 0; fi - fi - exit 1 + if ! samba_running; then exit 1; fi + if check && [[ "$(this interfaces)" == "$BIND" ]]; then exit 1; else exit 0; fi } case "$1" in diff --git a/etc/rc.d/rc.sshd b/etc/rc.d/rc.sshd index 728c49816..3aac59acf 100755 --- a/etc/rc.d/rc.sshd +++ b/etc/rc.d/rc.sshd @@ -100,10 +100,8 @@ sshd_reload(){ sshd_update(){ # 0 = update needed, 1 = no action - if sshd_running; then - if check && [[ "$(this ListenAddress)" == "${BIND[@]}" ]]; then exit 1; else exit 0; fi - fi - exit 1 + if ! sshd_running; then exit 1; fi + if check && [[ "$(this ListenAddress)" == "${BIND[@]}" ]]; then exit 1; else exit 0; fi } case "$1" in