apmd.rc6 568 B

1234567891011121314151617181920212223242526272829
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2016 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. need localmount
  6. }
  7. checkconfig() {
  8. if [ ! -e /proc/apm ] ; then
  9. eerror "APM support has not been compiled into the kernel"
  10. return 1
  11. fi
  12. }
  13. start() {
  14. checkconfig || return 1
  15. ebegin "Starting apmd"
  16. start-stop-daemon --start --quiet --pidfile /var/run/apmd.pid \
  17. --startas /usr/sbin/apmd -- ${APMD_OPTS}
  18. eend $?
  19. }
  20. stop() {
  21. ebegin "Stopping apmd"
  22. start-stop-daemon --stop --quiet --pidfile /var/run/apmd.pid
  23. eend $?
  24. }