File: tlp.init

package info (click to toggle)
tlp 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 1,420 kB
  • sloc: sh: 14,072; makefile: 298; perl: 279; xml: 40
file content (43 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (4)
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) 2025 Thomas Koch <linrunner at gmx.net> and others.
# 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

[ -r /lib/lsb/init-functions ] && . /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