SHC verschieben nach html

    • Habe den Fehler gefunden.
      In der init.d muss noch der Pfad nach shcd geändert werden.
      Zeile 35/37/39

      Quellcode

      1. #! /bin/sh
      2. ### BEGIN INIT INFO
      3. # Provides: shcd
      4. # Required-Start: $all
      5. # Required-Stop:
      6. # Default-Start: 2 3 4 5
      7. # Default-Stop:
      8. # Short-Description: Starts shc Processes
      9. ### END INIT INFO
      10. PATH=/sbin:/usr/sbin:/bin:/usr/bin
      11. . /lib/init/vars.sh
      12. . /lib/lsb/init-functions
      13. SHC_SHEDULER_PIDFILE=/var/run/shcd_sheduler.pid
      14. SHC_SWITCH_SERVER_PIDFILE=/var/run/shcd_switchserver.pid
      15. SHC_SENSOR_TRANSMITTER_PIDFILE=/var/run/shcd_sensor_transmitter.pid
      16. /bin/sleep 20
      17. do_start() {
      18. if [ -x /etc/rc.local ]; then
      19. [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
      20. /etc/rc.local
      21. ES=$?
      22. [ "$VERBOSE" != no ] && log_end_msg $ES
      23. return $ES
      24. fi
      25. }
      26. case "$1" in
      27. start)
      28. /usr/bin/php /var/www/html/shc/index.php app=shc -sh >> /var/log/messages 2>&1 &
      29. echo $! > $SHC_SHEDULER_PIDFILE
      30. /usr/bin/php /var/www/html/shc/index.php app=shc -ss >> /var/log/messages 2>&1 &
      31. echo $! > $SHC_SWITCH_SERVER_PIDFILE
      32. /usr/bin/php /var/www/html/shc/index.php app=shc -st >> /var/log/messages 2>&1 &
      33. echo $! > $SHC_SENSOR_TRANSMITTER_PIDFILE
      34. ;;
      35. restart|reload|force-reload)
      36. echo "Error: argument '$1' not supported" >&2
      37. exit 3
      38. ;;
      39. stop)
      40. if [ -f $SHC_SHEDULER_PIDFILE ]; then
      41. PID=`cat $SHC_SHEDULER_PIDFILE`
      42. fi
      43. if [ -f $SHC_SWITCH_SERVER_PIDFILE ]; then
      44. PID="$PID `cat $SHC_SWITCH_SERVER_PIDFILE`"
      45. fi
      46. if [ -f $SHC_SENSOR_TRANSMITTER_PIDFILE ]; then
      47. PID="$PID `cat $SHC_SENSOR_TRANSMITTER_PIDFILE`"
      48. fi
      49. kill -9 $PID && rm -f $SHC_SHEDULER_PIDFILE $SHC_SWITCH_SERVER_PIDFILE $SHC_SENSOR_TRANSMITTER_PIDFILE
      50. ;;
      51. *)
      52. echo "Usage: $0 start|stop" >&2
      53. exit 3
      54. ;;
      55. esac
      Alles anzeigen
      Kann besser Hardware als Software !