]> git.pld-linux.org Git - packages/bjorb.git/blame - bjorb.init
- pl, cosmetics
[packages/bjorb.git] / bjorb.init
CommitLineData
80a001eb 1#!/bin/sh
2#
3# bjorb Bjorb - secure TCP relay software
4#
5# chkconfig: 345 14 91
6#
7# description: Bjorb is secure TCP relay software. Bjorb provides you, secure \
8# end-to-end connection over insecure network such as Internet.\
9# Features:\
10# 1. Encrypt/decrypt any "static port" TCP connection with SSL.\
11# 2. Restrcit access by IP address.\
12# 3. Server side certification.\
13# 4. Client side certification.\
14#
15# pidfile: /var/run/bjorb.pid
16
17# Source function library
18. /etc/rc.d/init.d/functions
19
20# Get network config
21. /etc/sysconfig/network
22
23# Get service config - may override defaults
24[ -f /etc/sysconfig/bjorb ] && . /etc/sysconfig/bjorb
25
26# Check that networking is up.
27if is_yes "${NETWORKING}"; then
28 if [ ! -f /var/lock/subsys/network ]; then
29 # nls "ERROR: Networking is down. %s can't be run." bjorb
30 msg_network_down bjorb
31 exit 1
32 fi
33else
34 exit 0
35fi
36
37
38# See how we were called.
39case "$1" in
40 start)
41 # Check if the service is already running?
42 if [ ! -f /var/lock/subsys/bjorb ]; then
43 # show "Starting %s service" bjorb
44 msg_starting Bjorb
45 daemon bjorb -D
46 RETVAL=$?
47 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bjorb
48 else
49 # show "%s service is already running." bjorb
50 msg_already_running Bjorb
51 fi
52 ;;
53 stop)
54 if [ -f /var/lock/subsys/bjorb ]; then
55 # Stop daemons.
56 # show "Stopping %s service" bjorb
57 msg_stopping Bjorb
58 killproc bjorb
59 rm -f /var/lock/subsys/bjorb
60 else
61 # show "%s service is not running." bjorb
62 msg_not_running Bjorb
63 fi
64 ;;
65 restart)
66 $0 stop
67 $0 start
68 exit $?
69 ;;
70 reload)
71 if [ -f /var/lock/subsys/bjorb ]; then
72 # show "Reload %s service" bjorb
73 msg_reloading Bjorb
74 killproc bjorb -HUP
75 RETVAL=$?
76 else
77 # show "%s service is not running." bjorb
78 msg_not_running bjorb >&2
79 RETVAL=7
80 fi
81 ;;
82 force-reload)
83 # if program allows reloading without stopping
84 $0 reload
85
86 # or if it doesn't
87 $0 restart
88
89 exit $?
90 ;;
91 status)
92 status bjorb
93 RETVAL=$?
94 ;;
95 *)
96 # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
97 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
98 exit 3
99esac
100
101exit $RETVAL
102
103# This must be last line !
104# vi:syntax=sh:tw=78:ts=8:sw=4
This page took 0.064557 seconds and 4 git commands to generate.