Info-Terminal: Unterschied zwischen den Versionen

Aus FabLab Nürnberg Wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „Info-Terminal mit [https://info-beamer.com/download/player info-beamer] Software. User für info-beamer anlegen mit sudo adduser --no-create-home --disabled…“)
 
(Code tag um init-script verwendet)
Zeile 9: Zeile 9:
 
   /etc/init.d/info-beamer
 
   /etc/init.d/info-beamer
  
  #!/bin/sh
+
<code>
  ### BEGIN INIT INFO
+
#!/bin/sh
  # Provides:          info-beamer
+
### BEGIN INIT INFO
  # Required-Start:    hostname $local_fs
+
# Provides:          info-beamer
  # Required-Stop:
+
# Required-Start:    hostname $local_fs
  # Should-Start:
+
# Required-Stop:
  # Default-Start:    1 2 3 4 5
+
# Should-Start:
  # Default-Stop:
+
# Default-Start:    1 2 3 4 5
  # Short-Description: Start info-beamer to display screen
+
# Default-Stop:
  # Description:      info-beamer shows information on a screen instlled
+
# Short-Description: Start info-beamer to display screen
  #                    in the lab.
+
# Description:      info-beamer shows information on a screen instlled
  ### END INIT INFO
+
#                    in the lab.
 +
### END INIT INFO
  
  PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
PATH=/sbin:/usr/sbin:/bin:/usr/bin
  . /lib/init/vars.sh
+
. /lib/init/vars.sh
  
  do_start () {
+
do_start () {
          sudo -u info-beamer info-beamer /lib/info-beamer/default &
+
        sudo -u info-beamer info-beamer /lib/info-beamer/default &
  }
+
}
 
    
 
    
  do_status () {
+
do_status () {
          false
+
        false
  }
+
}
  
  do_stop () {
+
do_stop () {
          pkill info-beamer
+
        pkill info-beamer
  }
+
}
  
  case "$1" in
+
case "$1" in
    start|"")
+
  start|"")
          do_start
+
        do_start
          ;;
+
        ;;
    restart|reload|force-reload)
+
  restart|reload|force-reload)
          echo "Error: argument '$1' not supported" >&2
+
        echo "Error: argument '$1' not supported" >&2
          exit 3
+
        exit 3
          ;;
+
        ;;
    stop)
+
  stop)
          # No-op
+
        # No-op
          do_stop
+
        do_stop
          ;;
+
        ;;
    status)
+
  status)
          do_status
+
        do_status
          exit $?
+
        exit $?
          ;;
+
        ;;
    *)
+
  *)
          echo "Usage: info-beamerstart|stop|status]" >&2
+
        echo "Usage: info-beamerstart|stop|status]" >&2
          exit 3
+
        exit 3
          ;;
+
        ;;
  esac
+
esac
  
  :
+
:
 +
</code>

Version vom 10. Januar 2015, 18:16 Uhr

Info-Terminal mit info-beamer Software.

User für info-beamer anlegen mit

 sudo adduser --no-create-home --disabled-password --system info-beamer

Bei start wird angezeigt:

 /lib/info-beamer/default
 /etc/init.d/info-beamer

  1. !/bin/sh
      1. BEGIN INIT INFO
  2. Provides: info-beamer
  3. Required-Start: hostname $local_fs
  4. Required-Stop:
  5. Should-Start:
  6. Default-Start: 1 2 3 4 5
  7. Default-Stop:
  8. Short-Description: Start info-beamer to display screen
  9. Description: info-beamer shows information on a screen instlled
  10. in the lab.
      1. END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/init/vars.sh

do_start () {

       sudo -u info-beamer info-beamer /lib/info-beamer/default &

}

do_status () {

       false

}

do_stop () {

       pkill info-beamer

}

case "$1" in

 start|"")
       do_start
       ;;
 restart|reload|force-reload)
       echo "Error: argument '$1' not supported" >&2
       exit 3
       ;;
 stop)
       # No-op
       do_stop
       ;;
 status)
       do_status
       exit $?
       ;;
 *)
       echo "Usage: info-beamerstart|stop|status]" >&2
       exit 3
       ;;

esac