forked from linrunner/TLP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tlp.init
43 lines (35 loc) · 775 Bytes
/
tlp.init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
# tlp - system startup/shutdown
#
# Copyright (c) 2018 Thomas Koch <linrunner at gmx.net>
# This software is licensed under the GPL v2 or later.
#
# chkconfig: 2345 98 01
### 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 start/stop script
# Description: Initialize tlp
### END INIT INFO
. /lib/lsb/init-functions
TLP=/usr/sbin/tlp
[ -x $TLP ] || exit 0
case "$1" in
status)
tlp-stat -s
;;
start|\
stop|\
restart|\
force-reload)
$TLP init $1
;;
*)
echo "Usage: $0 start|stop|restart|force-reload|status" 1>&2
exit 3
;;
esac
exit 0