blob: b1fe358246ee8ff3fd7fd7f994d8301c7ab925fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/sh
if nginx -V 2>&1 | grep -q ubus; then
if [ -z "$(cat /etc/nginx/conf.d/luci.locations | grep ubus)" ]; then
cat <<EOT >> /etc/nginx/conf.d/luci.locations
location /ubus {
ubus_interpreter;
ubus_socket_path /var/run/ubus.sock;
ubus_parallel_req 2;
}
EOT
fi
fi
if [ -x /etc/init.d/uhttpd ]; then
/etc/init.d/uhttpd disable
if [ -n "$(pgrep uhttpd)" ]; then
/etc/init.d/uhttpd stop
fi
fi
/etc/init.d/nginx enable
if [ -n "$(pgrep nginx)" ]; then
/etc/init.d/nginx restart
else
/etc/init.d/nginx start
fi
/etc/init.d/uwsgi enable
if [ -n "$(pgrep uwsgi)" ]; then
/etc/init.d/uwsgi restart
else
/etc/init.d/uwsgi start
fi
exit 0
|