From fe1cc8fdef11bf5490fd9583daa9f7a7b61d76c5 Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 3 Oct 2023 05:45:57 +0200 Subject: [PATCH] scripts dutchification - batch 1 --- etc/rc.d/rc.apcupsd | 6 +++--- etc/rc.d/rc.avahidaemon | 6 +++--- etc/rc.d/rc.docker | 6 +++--- etc/rc.d/rc.inetd | 4 ++-- etc/rc.d/rc.libvirt | 6 +++--- etc/rc.d/rc.local_shutdown | 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.rsyslogd | 6 +++--- etc/rc.d/rc.samba | 6 +++--- etc/rc.d/rc.sshd | 6 +++--- etc/rc.d/rc.wireguard | 6 +++--- 14 files changed, 41 insertions(+), 41 deletions(-) diff --git a/etc/rc.d/rc.apcupsd b/etc/rc.d/rc.apcupsd index b0355fd67..7c89d476f 100755 --- a/etc/rc.d/rc.apcupsd +++ b/etc/rc.d/rc.apcupsd @@ -11,13 +11,13 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="APC-UPS Power Management" APCPID="/var/run/apcupsd.pid" LOCK="/var/lock/apcupsd" +# run & log functions +. /etc/rc.d/rc.runlog + apcupsd_running(){ [[ -f $APCPID ]] } diff --git a/etc/rc.d/rc.avahidaemon b/etc/rc.d/rc.avahidaemon index 051abeb17..3e4d56ec6 100755 --- a/etc/rc.d/rc.avahidaemon +++ b/etc/rc.d/rc.avahidaemon @@ -26,14 +26,14 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="Avahi mDNS/DNS-SD daemon" CALLER="avahi" AVAHI="/usr/sbin/avahi-daemon" CONF="/etc/avahi/avahi-daemon.conf" +# run & log functions +. /etc/rc.d/rc.runlog + # library functions . /etc/rc.d/rc.library.source diff --git a/etc/rc.d/rc.docker b/etc/rc.d/rc.docker index f30963349..d43a273a3 100755 --- a/etc/rc.d/rc.docker +++ b/etc/rc.d/rc.docker @@ -12,9 +12,6 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="Docker daemon" UNSHARE="/usr/bin/unshare" SYSTEM="/sys/class/net" @@ -35,6 +32,9 @@ DOCKER_TIMEOUT=$(awk -F'"' '/^DOCKER_TIMEOUT=/{print $2}' $DOCKER_CFG 2>/dev/nul INI=/var/local/emhttp/network.ini TMP=/var/tmp/network.tmp +# run & log functions +. /etc/rc.d/rc.runlog + # determine active port name [[ -e $SYSTEM/bond0 ]] && PORT=bond0 || PORT=eth0 [[ -e $SYSTEM/br0 ]] && PORT=br0 diff --git a/etc/rc.d/rc.inetd b/etc/rc.d/rc.inetd index abcd4bdb9..468f3b6b7 100755 --- a/etc/rc.d/rc.inetd +++ b/etc/rc.d/rc.inetd @@ -7,11 +7,11 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 +DAEMON="Internet daemon" + # run & log functions . /etc/rc.d/rc.runlog -DAEMON="Internet daemon" - inetd_start() { log "Starting $DAEMON..." if [[ -x /usr/sbin/inetd ]]; then diff --git a/etc/rc.d/rc.libvirt b/etc/rc.d/rc.libvirt index fa924d4c7..05eeb4595 100755 --- a/etc/rc.d/rc.libvirt +++ b/etc/rc.d/rc.libvirt @@ -22,9 +22,6 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="libvirt daemon" MODULES=${MODULES:-"vhost_net"} TIMEOUT=${TIMEOUT:-60} @@ -42,6 +39,9 @@ SYSTEM="/sys/class/net" VIRTLOG="virtlog daemon" VIRTLOCK="virtlock daemon" +# run & log functions +. /etc/rc.d/rc.runlog + # Read Unraid configuration [[ -f $BOOT_DOMAIN ]] && . $BOOT_DOMAIN diff --git a/etc/rc.d/rc.local_shutdown b/etc/rc.d/rc.local_shutdown index 2835a6f2a..50252a000 100755 --- a/etc/rc.d/rc.local_shutdown +++ b/etc/rc.d/rc.local_shutdown @@ -7,12 +7,12 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - # Beep the motherboard speaker beep -r 2 +# run & log functions +. /etc/rc.d/rc.runlog + # Invoke custom 'stop' script if present if [[ -f /boot/config/stop ]]; then log "Starting stop script" diff --git a/etc/rc.d/rc.nfsd b/etc/rc.d/rc.nfsd index 3f99b239b..2c76500b5 100755 --- a/etc/rc.d/rc.nfsd +++ b/etc/rc.d/rc.nfsd @@ -12,9 +12,6 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="NFS server daemon" CALLER="nfs" NFSD="/usr/sbin/rpc.nfsd" @@ -25,6 +22,9 @@ OPTIONS="-u -s" RPC="/etc/default/rpc" NFS="/etc/default/nfs" +# run & log functions +. /etc/rc.d/rc.runlog + # library functions . /etc/rc.d/rc.library.source diff --git a/etc/rc.d/rc.nginx b/etc/rc.d/rc.nginx index 008c1bf5e..f43d85586 100755 --- a/etc/rc.d/rc.nginx +++ b/etc/rc.d/rc.nginx @@ -17,9 +17,6 @@ # WANFQDN 'www.hash.unraid.net' (legacy) # WG0FQDN 'wg0-ip.hash.myunraid.net' (wildcard cert) -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="Nginx server daemon" CALLER="nginx" NGINX="/usr/sbin/nginx" @@ -55,6 +52,9 @@ if ! find /boot/config/*.key &>/dev/null; then START_PAGE="Tools/Registration" fi +# run & log functions +. /etc/rc.d/rc.runlog + # library functions . /etc/rc.d/rc.library.source diff --git a/etc/rc.d/rc.ntpd b/etc/rc.d/rc.ntpd index 3a2479dfe..fee77f4d9 100755 --- a/etc/rc.d/rc.ntpd +++ b/etc/rc.d/rc.ntpd @@ -7,9 +7,6 @@ # LimeTech - modified to initialize ntp.conf file from config # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="NTP server daemon" CALLER="ntp" NTPD="/usr/sbin/ntpd" @@ -17,6 +14,9 @@ OPTIONS="-g -u ntp:ntp" CONF="/etc/ntp.conf" IDENT="/boot/config/ident.cfg" +# run & log functions +. /etc/rc.d/rc.runlog + # library functions . /etc/rc.d/rc.library.source diff --git a/etc/rc.d/rc.rpc b/etc/rc.d/rc.rpc index 82de8fd39..d1a473212 100755 --- a/etc/rc.d/rc.rpc +++ b/etc/rc.d/rc.rpc @@ -13,15 +13,15 @@ # LimeTech - get rid of chatty '-l' rpcbind option # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="RPC server daemon" CALLER="rpc" RPCBIND="/sbin/rpcbind" STATD="/sbin/rpc.statd" RPC="/etc/default/rpc" +# run & log functions +. /etc/rc.d/rc.runlog + # library functions . /etc/rc.d/rc.library.source diff --git a/etc/rc.d/rc.rsyslogd b/etc/rc.d/rc.rsyslogd index b4257617e..9fae36aaf 100755 --- a/etc/rc.d/rc.rsyslogd +++ b/etc/rc.d/rc.rsyslogd @@ -12,12 +12,12 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="Syslog server daemon" PIDFILE=/var/run/rsyslogd.pid # native rsyslogd pid file +# run & log functions +. /etc/rc.d/rc.runlog + create_xconsole(){ if [[ ! -e /dev/xconsole ]]; then mknod -m 640 /dev/xconsole p diff --git a/etc/rc.d/rc.samba b/etc/rc.d/rc.samba index 88d237b0b..1bad89510 100755 --- a/etc/rc.d/rc.samba +++ b/etc/rc.d/rc.samba @@ -9,9 +9,6 @@ # LimeTech - modified to initialize smb-names.conf file from config # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="Samba server daemon" CALLER="smb" SMBD="/usr/sbin/smbd" @@ -24,6 +21,9 @@ IDENT="/boot/config/ident.cfg" BOOT="/boot/config" PRIVATE="/var/lib/samba/private" +# run & log functions +. /etc/rc.d/rc.runlog + # library functions . /etc/rc.d/rc.library.source diff --git a/etc/rc.d/rc.sshd b/etc/rc.d/rc.sshd index 4026b693a..271435123 100755 --- a/etc/rc.d/rc.sshd +++ b/etc/rc.d/rc.sshd @@ -7,9 +7,6 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - DAEMON="SSH server daemon" CALLER="ssh" SSHD="/usr/sbin/sshd" @@ -18,6 +15,9 @@ PID="/var/run/sshd.pid" SSH_BOOT="/boot/config/ssh" SSH_ETC="/etc/ssh" +# run & log functions +. /etc/rc.d/rc.runlog + # library functions . /etc/rc.d/rc.library.source diff --git a/etc/rc.d/rc.wireguard b/etc/rc.d/rc.wireguard index c170ef9ea..8f389b02c 100755 --- a/etc/rc.d/rc.wireguard +++ b/etc/rc.d/rc.wireguard @@ -8,15 +8,15 @@ # LimeTech - modified for Unraid OS # Bergware - modified for Unraid OS, October 2023 -# run & log functions -. /etc/rc.d/rc.runlog - SYSTEM=/sys/class/net WIREGUARD=/etc/wireguard BOOT="/boot/config" LOG=/var/log/wg-quick.log TMP=/tmp/wg-quick.tmp +# run & log functions +. /etc/rc.d/rc.runlog + wg_start(){ if ! iptables -S | grep -qom1 "WIREGUARD$"; then run iptables -N WIREGUARD