Add local and public QR sharing for training profiles
This commit is contained in:
30
scripts/teltonika/racecore-nginx.init
Executable file
30
scripts/teltonika/racecore-nginx.init
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=95
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
NGINX_BIN="/usr/sbin/nginx"
|
||||
NGINX_CONF="/etc/nginx/nginx.conf"
|
||||
|
||||
prepare_runtime() {
|
||||
mkdir -p /tmp/nginx/client_body /tmp/nginx/proxy /tmp/nginx/fastcgi /tmp/nginx/uwsgi /tmp/nginx/scgi
|
||||
}
|
||||
|
||||
start_service() {
|
||||
prepare_runtime
|
||||
"$NGINX_BIN" -t -c "$NGINX_CONF" || return 1
|
||||
procd_open_instance
|
||||
procd_set_param command "$NGINX_BIN" -c "$NGINX_CONF" -g "daemon off;"
|
||||
procd_set_param respawn 3600 5 5
|
||||
procd_set_param file "$NGINX_CONF"
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
prepare_runtime
|
||||
"$NGINX_BIN" -t -c "$NGINX_CONF" || return 1
|
||||
"$NGINX_BIN" -s reload -c "$NGINX_CONF"
|
||||
}
|
||||
Reference in New Issue
Block a user