# touch darkmdadmmail.sh # chmod +x darkmdadmmail.sh # nano darkmdadmmail.sh #!/bin/sh ### BEGIN INIT INFO # Provides: darkmdadmmail # Required-Start: $all # Required-Stop: $all # Should-Start: $all # Should-Stop: $all # Default-Start: 5 # Default-Stop: 0 1 2 3 4 6 # Short-Description: Скрипт для принудительной проверки mdadm. ### END INIT INFO MDADM="/sbin/mdadm" ARGS="--monitor --scan -1 --mail=test@your.domen --test" case "$1" in start) $MDADM $ARGS ;; stop) echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop}" >&2 exit 1 ;; esac exit 0 # update-rc.d darkmdadmmail.sh defaults Adding system startup for /etc/init.d/darkmdadmmail.sh ... /etc/rc0.d/K20darkmdadmmail.sh -> ../init.d/darkmdadmmail.sh /etc/rc1.d/K20darkmdadmmail.sh -> ../init.d/darkmdadmmail.sh /etc/rc6.d/K20darkmdadmmail.sh -> ../init.d/darkmdadmmail.sh /etc/rc2.d/S20darkmdadmmail.sh -> ../init.d/darkmdadmmail.sh /etc/rc3.d/S20darkmdadmmail.sh -> ../init.d/darkmdadmmail.sh /etc/rc4.d/S20darkmdadmmail.sh -> ../init.d/darkmdadmmail.sh /etc/rc5.d/S20darkmdadmmail.sh -> ../init.d/darkmdadmmail.sh