hd-idle/debian/hd-idle.init
Alexandre Mestiashvili 05b82773a0 Import Debian changes 1.05+ds-2
hd-idle (1.05+ds-2) unstable; urgency=medium
.
  * No-change, Source-only upload
.
hd-idle (1.05+ds-1) unstable; urgency=medium
.
  * Initial release. Closes: #924749
2025-08-06 15:48:19 +02:00

51 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides: hd-idle
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start hd-idle daemon
# Description: Start hd-idle daemon (spin down idle hard disks)
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/hd-idle
[ -r /etc/default/hd-idle ] && . /etc/default/hd-idle
# See if the daemon is there
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting the hd-idle daemon" "hd-idle"
start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $HD_IDLE_OPTS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping the hd-idle daemon" "hd-idle"
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
log_end_msg $?
;;
restart|force-reload)
$0 stop && sleep 2 && $0 start
;;
status)
status_of_proc $DAEMON hd-idle && exit 0 || exit $?
;;
*)
echo "Usage: /etc/init.d/hd-idle start/stop/restart/force-reload"
exit 1
;;
esac