Kagera Web Interface
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh /etc/rc.common
  2. START=51
  3. PID_HTTP=/var/run/webui-http.pid
  4. PID_HTTPS=/var/run/webui-https.pid
  5. start() {
  6. config_load "kagera"
  7. config_get CERT_FILE "webui" cert_file
  8. config_get HTTP_PORT "webui" http_port
  9. config_get HTTPS_PORT "webui" https_port
  10. config_get UI_LANG "webui" language
  11. config_get PROTOCOL "webui" protocol
  12. [ -z "$CERT_FILE" ] && CERT_FILE="/usr/lib/kagera/kagera.pem"
  13. [ -z "$HTTP_PORT" ] && HTTP_PORT="80"
  14. [ -z "$HTTPS_PORT" ] && HTTPS_PORT="443"
  15. [ -z "$UI_LANG" ] && UI_LANG="english"
  16. [ -z "$PROTOCOL" ] && PROTOCOL="http"
  17. if [ "$PROTOCOL" == "http" ]; then
  18. kuhttpd -d "/usr/lib/kagera/webui" -i "$PID_HTTP" -p "$HTTP_PORT" -L "$UI_LANG" 2>/dev/null
  19. elif [ "$PROTOCOL" == "https" ]; then
  20. kuhttpd -d "/usr/lib/kagera/webui" -i "$PID_HTTPS" -p "$HTTPS_PORT" -S -E "$CERT_FILE" -L "$UI_LANG" 2>/dev/null
  21. else
  22. kuhttpd -d "/usr/lib/kagera/webui" -i "$PID_HTTPS" -p "$HTTP_PORT" -SP "$HTTPS_PORT" -S -E "$CERT_FILE" -L "$UI_LANG" 2>/dev/null
  23. fi
  24. }
  25. stop() {
  26. [ -f "$PID_HTTP" ] && kill "$(cat $PID_HTTP)" 2>/dev/null
  27. [ -f "$PID_HTTPS" ] && kill "$(cat $PID_HTTPS)" 2>/dev/null
  28. }