/[smeserver]/rpms/ulogd/sme10/ulogd.init
ViewVC logotype

Contents of /rpms/ulogd/sme10/ulogd.init

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Mar 4 19:46:47 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: ulogd-2_0_7-1_el7_sme, HEAD
Error occurred while calculating annotation data.
* Wed Mar 03 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.7-2.sme
- bump version to 2.0.7 [SME: 11248]
- remove init script, let integrator choose between systemd and init.

1 #!/bin/sh
2 #
3 # chkconfig: - 81 19
4 # description: ulogd is the userspace logging daemon for netfilter/iptables
5 ### BEGIN INIT INFO
6 # Provides: ulogd
7 # Required-Start: $local_fs $network $remote_fs
8 # Should-Start: $syslog
9 # Required-Stop: $local_fs $network $remote_fs
10 # Should-Stop: $syslog
11 # Default-Start:
12 # Default-Stop: 0 1 6
13 # Short-Description: start and stop ulogd
14 # Description: ulogd is the userspace logging daemon for netfilter/iptables
15 ### END INIT INFO
16 #
17
18 . /etc/rc.d/init.d/functions
19
20 RETVAL=0
21 prog="ulogd"
22 lockfile=/var/lock/subsys/ulogd
23
24 ULOGD=/usr/sbin/$prog
25
26 # Check that networking is up.
27 . /etc/sysconfig/network
28 [ "$NETWORKING" = "no" ] && exit 0
29
30 [ -x $ULOGD ] || exit 1
31 [ -f /etc/$prog.conf ] || exit 2
32
33 start()
34 {
35 printf "Starting $prog: "
36 daemon $ULOGD -d && success || failure
37 RETVAL=$?
38 [ $RETVAL -eq 0 ] && touch $lockfile
39 printf "\n"
40 }
41
42 stop()
43 {
44 printf "Stopping $prog: "
45 killproc $ULOGD
46 RETVAL=$?
47
48 [ $RETVAL -eq 0 ] && rm -f $lockfile
49 printf "\n"
50 }
51
52 reload()
53 {
54 printf "Reloading $prog: "
55 pid=$(pidof ulogd)
56 if [ "x$pid" != "x" ]; then
57 killproc $ULOGD -HUP
58 else
59 failure "Reloading $prog"
60 fi
61 RETVAL=$?
62 printf "\n"
63 }
64
65 restart()
66 {
67 stop
68 start
69 }
70
71 case "$1" in
72 start)
73 start
74 ;;
75
76 stop)
77 stop
78 ;;
79
80 restart)
81 restart
82 ;;
83
84 condrestart|try-restart)
85 if [ -f $lockfile ]; then
86 restart
87 fi
88 ;;
89
90 reload|force-reload)
91 reload
92 ;;
93
94 status)
95 status $ULOGD
96 ;;
97
98 *)
99 printf "Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}\n"
100 RETVAL=2
101 esac
102
103 exit $RETVAL

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed