]> git.pld-linux.org Git - packages/firestarter.git/blame - firestarter.init
- updated gettext BR
[packages/firestarter.git] / firestarter.init
CommitLineData
425f19f7 1#!/bin/sh
2#
3# firestarter Firestarter firewall.
4#
5# chkconfig: 2345 11 89
6#
7# description: Starts and stops FireStarter, an easy-to-use,
e415aab4 8# yet powerful, Linux firewall tool for GNOME.
425f19f7 9#
10# $Id$
11
425f19f7 12# Source function library
13. /etc/rc.d/init.d/functions
14
15# Get network config
16. /etc/sysconfig/network
17
da15d23c 18FS_CONTROL=/etc/firestarter/firestarter.sh
425f19f7 19
20# Check that networking is up.
21if is_yes "${NETWORKING}"; then
da15d23c
ER
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down "firestarter"
425f19f7 24 exit 1
25 fi
26else
27 exit 0
28fi
29
da15d23c
ER
30start() {
31 # Check if the service is already running?
32 if [ -f /var/lock/subsys/firestarter ]; then
33 msg_already_running "firestarter"
34 return
35 fi
36
37 msg_starting "firestarter"
38 busy
39 $FS_CONTROL start > /dev/null
40 RETVAL=$?
41 if [ $RETVAL -eq 0 ]; then
42 touch /var/lock/subsys/firestarter
43 ok
44 else
45 fail
46 fi
47}
48
49stop() {
12cfa10e 50 if [ ! -f /var/lock/subsys/firestarter ]; then
da15d23c
ER
51 msg_not_running "firestarter"
52 return
53 fi
54
55 msg_stopping "firestarter"
56 busy
57 $FS_CONTROL stop > /dev/null
58 rm -f /var/lock/subsys/firestarter
59 ok
60}
61
62condrestart() {
63 if [ ! -f /var/lock/subsys/firestarter ]; then
64 msg_not_running "firestarter"
65 RETVAL=$1
66 return
67 fi
68
69 stop
70 start
71}
425f19f7 72
73# See how we were called.
74case "$1" in
75 start)
da15d23c 76 start
425f19f7 77 ;;
78 stop)
da15d23c 79 stop
425f19f7 80 ;;
81 restart)
da15d23c
ER
82 stop
83 start
425f19f7 84 ;;
da15d23c
ER
85 try-restart)
86 condrestart 0
425f19f7 87 ;;
88 force-reload)
da15d23c 89 condrestart 7
425f19f7 90 ;;
91 status)
92 status firestarter
93 RETVAL=$?
94 ;;
95 *)
da15d23c 96 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
425f19f7 97 exit 3
98esac
99
100exit $RETVAL
This page took 0.063086 seconds and 4 git commands to generate.