Sync with development-SDXPINN
This commit is contained in:
20
unused/init.d/nginx
Normal file
20
unused/init.d/nginx
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
START=80
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
[ -d /var/log/nginx ] || mkdir -p /var/log/nginx
|
||||
[ -d /var/lib/nginx ] || mkdir -p /var/lib/nginx
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
|
||||
procd_set_param file /etc/nginx/nginx.conf
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
killall nginx
|
||||
}
|
||||
51
unused/init.d/socat-at-bridge-NOTREADY
Normal file
51
unused/init.d/socat-at-bridge-NOTREADY
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG_PATH="/usr/bin"
|
||||
|
||||
start_service() {
|
||||
|
||||
# Start socat services
|
||||
|
||||
procd_open_instance socat_smd11
|
||||
procd_set_param command $PROG_PATH/socat -d -d pty,link=/dev/ttyIN,raw,echo=0,group=20,perm=660 pty,link=/dev/ttyOUT,raw,echo=1,group=20,perm=660
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
sleep 1
|
||||
|
||||
procd_open_instance socat_smd7
|
||||
procd_set_param command $PROG_PATH/socat -d -d pty,link=/dev/ttyIN2,raw,echo=0,group=20,perm=660 pty,link=/dev/ttyOUT2,raw,echo=1,group=20,perm=660
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
sleep 1
|
||||
|
||||
# Start forwarding services
|
||||
|
||||
procd_open_instance socat_smd11_from_ttyIN
|
||||
procd_set_param command /bin/ash -c "/bin/cat /dev/ttyIN > /dev/smd11"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
procd_open_instance socat_smd11_to_ttyIN
|
||||
procd_set_param command /bin/ash -c "/bin/cat /dev/smd11 > /dev/ttyIN"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
|
||||
procd_open_instance socat_smd7_from_ttyIN2
|
||||
procd_set_param command /bin/ash -c "/bin/cat /dev/ttyIN2 > /dev/smd7"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
procd_open_instance socat_smd7_to_ttyIN2
|
||||
procd_set_param command /bin/ash -c "/bin/cat /dev/smd7 > /dev/ttyIN2"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
killall socat
|
||||
}
|
||||
65
unused/nginx.conf
Normal file
65
unused/nginx.conf
Normal file
@@ -0,0 +1,65 @@
|
||||
user root;
|
||||
worker_processes auto;
|
||||
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 5;
|
||||
|
||||
client_body_buffer_size 10K;
|
||||
client_header_buffer_size 1k;
|
||||
client_max_body_size 1G;
|
||||
large_client_header_buffers 2 2k;
|
||||
|
||||
disable_symlinks off;
|
||||
root /www;
|
||||
|
||||
access_log off;
|
||||
|
||||
index index.html;
|
||||
|
||||
# Main Server Block
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen 443 ssl default_server;
|
||||
root /www;
|
||||
|
||||
# SSL Configuration
|
||||
ssl_certificate /etc/nginx/conf.d/_lan.crt;
|
||||
ssl_certificate_key /etc/nginx/conf.d/_lan.key;
|
||||
|
||||
# Index File
|
||||
index index.html;
|
||||
|
||||
# Serve static files from /www
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# Serve LuCI uHTTPd content
|
||||
location /cgi-bin/ {
|
||||
disable_symlinks off; # Allow symbolic links to be followed
|
||||
proxy_pass http://127.0.0.1:1000;
|
||||
}
|
||||
|
||||
location /ubus/ {
|
||||
disable_symlinks off; # Allow symbolic links to be followed
|
||||
proxy_pass http://127.0.0.1:1000;
|
||||
}
|
||||
|
||||
location /luci-static/ {
|
||||
disable_symlinks off; # Allow symbolic links to be followed
|
||||
proxy_pass http://127.0.0.1:1000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user