projects
/
apps
/
home
/
settings.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
tizen 2.3.1 release
[apps/home/settings.git]
/
setting-security
/
src
/
setting-firewall
/
firewall.sh
1
#!/bin/sh
2
3
DESC="Tizen firewall"
4
DAEMON=/usr/bin/$NAME
5
MJRUN=/usr/apps/org.tizen.setting/bin/firewall
6
FIREWALLSTART="30"
7
FIREWALLSTOP="31"
8
9
[ -x "$MJRUN" ] || exit 0
10
11
do_start() {
12
$MJRUN $FIREWALLSTART
13
RETVAL=$?
14
return "$RETVAL"
15
16
}
17
18
do_stop(){
19
$MJRUN $FIREWALLSTOP
20
RETVAL=$?
21
return "$RETVAL"
22
}
23
24
25
26
prt_res() {
27
RETVAL=$1
28
29
case "$RETVAL" in
30
77)
31
echo "... done."
32
RETVAL=0
33
;;
34
*)
35
echo "... failed!"
36
RETVAL=1
37
;;
38
esac
39
return $RETVAL
40
}
41
42
case "$1" in
43
start)
44
echo "Starting $DESC"
45
do_start
46
prt_res $?
47
48
;;
49
stop)
50
echo "Stopping $DESC"
51
do_stop
52
prt_res $?
53
;;
54
*)
55
echo "Usage: firewall {start|stop}" >&2
56
exit 3
57
;;
58
esac