aboutsummaryrefslogtreecommitdiff
path: root/system/ffproxy/rc.ffproxy
blob: 8d023bad7d3d69c5a9d1148f8a59578ad0f001ca (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
39
40
#!/bin/sh
# Start or stop ffproxy

# Start ffproxy
ffproxy_start()
{
  if [ -x /usr/sbin/ffproxy ]
  then
    echo "Starting HTTP/HTTPS proxy server:  /usr/sbin/ffproxy"
    /usr/sbin/ffproxy -d
  fi
}

# Stop ffproxy
ffproxy_stop()
{
  killall ffproxy
}

# Restart ffproxy
ffproxy_restart()
{
  ffproxy_stop
  sleep 1
  ffproxy_start
}

case "$1" in
'start')
  ffproxy_start
  ;;
'stop')
  ffproxy_stop
  ;;
'restart')
  ffproxy_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac