All pastes #34076 Raw Edit

Something

public text v1 · immutable
#34076 ·published 2005-12-18 17:44 UTC
rendered paste body
!/bin/sh
#
#

case "$1" in
  start)
    echo -n "Starting lirc daemon:"
      echo -n " lircd"
      /sbin/start-stop-daemon --start --quiet --exec /usr/sbin/lircd

      echo -n " lircmd"
      /sbin/start-stop-daemon --start --quiet --exec /usr/sbin/lircmd
    echo "."
    ;;
  stop)
    echo -n "Stopping lirc daemon:"
    echo -n " lircmd"
    start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
    echo -n " lircd"
    start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
    echo "."
    ;;
  reload|force-reload)
    if $START_LIRCD; then
      start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd
    fi
    if $START_LIRCMD; then
      start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircmd
    fi
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
    exit 1
esac

exit 0