SPS · log · files · refs · tags · releases · people · languages · GitHub · file
lib/setup/sv/sysvinit/tlp
#!/bin/sh
### BEGIN INIT INFO
# Provides: tlp
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TLP laptop power management
### END INIT INFO
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
NAME=tlp
DAEMON="/usr/sbin/tlp"
DAEMON_ARGS="init start"
PIDFILE="/run/tlp.pid"
USER=""
start() {
eval "$DAEMON" $DAEMON_ARGS
return $?
}
stop() {
return 0
}
status() {
pidofproc -p "$PIDFILE" "$DAEMON"
}
case $1 in
start) start ;;
stop) stop ;;
restart) stop; start ;;
status) status ;;
*) printf '%s\n' "Usage: $0 {start|stop|restart|status}" >&2; exit 1 ;;
esac