]> git.pld-linux.org Git - packages/fakebo.git/blame - fakebo.init
- sort verify() flags, PreReq -> Requires
[packages/fakebo.git] / fakebo.init
CommitLineData
c8deca80 1#!/bin/sh
2#
3# fakebo This shell script takes care of starting and stopping
4# fakebo (trojan server fake daemon).
5#
4919fa83 6# chkconfig: 345 95 06
c8deca80 7#
4919fa83 8# description: FakeBO fakes trojan server responses (Back Orifice, \
c8deca80 9# NetBus, etc.) and logs every attempt to a logfile or stdout.
10
11
12# Source function library
13. /etc/rc.d/init.d/functions
14
15# Get network config
16. /etc/sysconfig/network
17
18# Get service config - may override defaults
19[ -f /etc/sysconfig/fakebo ] && . /etc/sysconfig/fakebo
20
21# Check that networking is up.
5c6f6e36 22if is_yes "${NETWORKING}"; then
57728c8a 23 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
5c6f6e36 24 # nls "ERROR: Networking is down. %s can't be run." fakebo
25 msg_network_down fakebo
26 exit 1
27 fi
28else
29 exit 0
c8deca80 30fi
31
670f670b 32RETVAL=0
c8deca80 33# See how we were called.
34case "$1" in
35 start)
36 # Check if the service is already running?
37 if [ ! -f /var/lock/subsys/fakebo ]; then
38 # show "Starting %s service." fakebo
39 msg_starting fakebo
40 daemon fakebo -b
41 RETVAL=$?
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fakebo
43 else
44 # show "%s service is already running." fakebo
5c6f6e36 45 msg_already_running fakebo
c8deca80 46 fi
5c6f6e36 47 ;;
c8deca80 48 stop)
5c6f6e36 49 # Stop daemons.
50 # show "Stopping %s service" fakebo
c8deca80 51 if [ -f /var/lock/subsys/fakebo ]; then
52 msg_stopping fakebo
53 killproc fakebo
54 rm -f /var/lock/subsys/fakebo >/dev/null 2>&1
55 else
56 # show "%s service is not running." fakebo
5c6f6e36 57 msg_not_running fakebo
c8deca80 58 fi
5c6f6e36 59 ;;
670f670b 60 restart|force-reload)
5c6f6e36 61 $0 stop
c8deca80 62 $0 start
670f670b 63 exit $?
5c6f6e36 64 ;;
c8deca80 65 status)
66 status fakebo
67 exit $?
5c6f6e36 68 ;;
c8deca80 69 *)
670f670b 70 # show "Usage: %s {start|stop|restart|force-reload|status}"
71 msg_usage "$0 {start|stop|restart|force-reload|status}"
72 exit 3
c8deca80 73esac
74
75exit $RETVAL
This page took 0.088336 seconds and 4 git commands to generate.