diff options
author | jack <[email protected]> | 2023-11-20 13:22:56 -0700 |
---|---|---|
committer | jack <[email protected]> | 2023-11-20 13:22:56 -0700 |
commit | 0fd7df369678bb805fbc523b00eded9f0d699f18 (patch) | |
tree | 86c3ba72f43b3087c03fd416c4a8cfb128a30cab /etc/rc.d/init.d/tlp | |
parent | 381d614a915efefc8edd8e40b810120f66fe7c3c (diff) | |
download | dots-0fd7df369678bb805fbc523b00eded9f0d699f18.tar.gz dots-0fd7df369678bb805fbc523b00eded9f0d699f18.zip |
misc
Diffstat (limited to 'etc/rc.d/init.d/tlp')
-rwxr-xr-x | etc/rc.d/init.d/tlp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/etc/rc.d/init.d/tlp b/etc/rc.d/init.d/tlp new file mode 100755 index 00000000..6c5f9a7c --- /dev/null +++ b/etc/rc.d/init.d/tlp @@ -0,0 +1,33 @@ +#!/bin/sh +. /lib/lsb/init-functions + +case "${1}" in + start) + log_info_msg "Starting tlp..." + if ! pidofproc daemon_name_as_reported_by_ps >/dev/null; then + /usr/sbin/tlp init start + fi + evaluate_retval + ;; + + stop) + log_info_msg "Stopping..." + if pidofproc daemon_name_as_reported_by_ps >/dev/null; then + /usr/sbin/tlp init stop + fi + evaluate_retval + ;; + + restart) + ${0} stop + sleep 1 + ${0} start + ;; + + *) + echo "Usage: ${0} {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 |