binlsrv.initd 775 B

123456789101112131415161718192021222324252627282930
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2011 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. need net
  6. }
  7. start() {
  8. ebegin "Starting binlsrv"
  9. if [ -z "$INFILE_PATH" ]; then
  10. eerror "Path to devlist.cache not set, please set \$INFILE_PATH in /etc/conf.d/binlsrv"
  11. return 1
  12. fi
  13. if [ ! -e "$INFILE_PATH/devlist.cache" ]; then
  14. eerror "devlist.cache not generated, please make it with infparser.py"
  15. fi
  16. start-stop-daemon --start -i --exec /usr/bin/binlsrv.py --background \
  17. --make-pidfile --pidfile /var/run/binlsrv.pid --chdir "$INFILE_PATH" \
  18. --stdout /var/log/binlsrv.log
  19. eend $?
  20. }
  21. stop() {
  22. ebegin "Stopping binlsrv"
  23. start-stop-daemon --stop -i --exec /usr/bin/binlsrv.py --pidfile /var/run/binlsrv.pid
  24. eend $?
  25. }