Browse code

- removed original packaging files - Makefile updated to use new location of files

Jan Janak authored on 20/07/2006 14:29:12
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,84 +0,0 @@
1
-#! /bin/sh
2
-#
3
-# skeleton	example file to build /etc/init.d/ scripts.
4
-#		This file should be used to construct scripts for /etc/init.d.
5
-#
6
-#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
7
-#		Modified for Debian GNU/Linux
8
-#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
9
-#
10
-# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
11
-#
12
-#  adapted for ser by Andrei Pelinescu-Onciul <pelinescu-onciul@fokus.gmd.de>
13
-# $Id$
14
-
15
-
16
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
-DAEMON=/usr/sbin/ser
18
-NAME=ser
19
-DESC=ser
20
-PIDFILE=/var/run/$NAME/$NAME.pid
21
-PARAMS="-P $PIDFILE -u ser -g ser"
22
-LD_LIBRARY_PATH=/usr/lib/ser
23
-
24
-test -f $DAEMON || exit 0
25
-
26
-export LD_LIBRARY_PATH
27
-set -e
28
-
29
-case "$1" in
30
-  start)
31
-	echo -n "Starting $DESC: $NAME"
32
-	start-stop-daemon --start --quiet --pidfile $PIDFILE \
33
-		--exec $DAEMON -- $PARAMS
34
-	echo "."
35
-	;;
36
-  stop)
37
-	echo -n "Stopping $DESC: $NAME"
38
-	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
39
-		--exec $DAEMON
40
-	echo "."
41
-	;;
42
-  #reload)
43
-	#
44
-	#	If the daemon can reload its config files on the fly
45
-	#	for example by sending it SIGHUP, do it here.
46
-	#
47
-	#	If the daemon responds to changes in its config file
48
-	#	directly anyway, make this a do-nothing entry.
49
-	#
50
-	# echo "Reloading $DESC configuration files."
51
-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
52
-	#	$PIDFILE --exec $DAEMON
53
-  #;;
54
-  restart|force-reload)
55
-	#
56
-	#	If the "reload" option is implemented, move the "force-reload"
57
-	#	option to the "reload" entry above. If not, "force-reload" is
58
-	#	just the same as "restart".
59
-	#
60
-	# Check if ser configuration is valid before restarting the server
61
-        (($DAEMON -c 2>&1) | grep "config file ok, exiting") > /dev/null
62
-	if [ $? -ne 0 ]; then
63
-            ($DAEMON -c 2>&1)
64
-	    echo -e "\nThere are errors in the configuration file. Please fix them first"
65
-	    echo -e "\n$out\n"
66
-	    exit 0
67
-	fi
68
-	echo -n "Restarting $DESC: $NAME"
69
-	start-stop-daemon --oknodo --stop --quiet --pidfile \
70
-		$PIDFILE --exec $DAEMON
71
-	sleep 1
72
-	start-stop-daemon --start --quiet --pidfile \
73
-		$PIDFILE --exec $DAEMON  -- $PARAMS
74
-	echo "."
75
-	;;
76
-  *)
77
-	N=/etc/init.d/$NAME
78
-	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
79
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
80
-	exit 1
81
-	;;
82
-esac
83
-
84
-exit 0
Browse code

- fixed bug in config file checks (the check failed if ser -c produced a waring, such as "unable to resolve..." (ported from stable) - LD_LIBRARY_PATH set to /usr/lib/ser/

Jan Janak authored on 12/01/2006 15:21:49
Showing 1 changed files
... ...
@@ -19,9 +19,11 @@ NAME=ser
19 19
 DESC=ser
20 20
 PIDFILE=/var/run/$NAME/$NAME.pid
21 21
 PARAMS="-P $PIDFILE -u ser -g ser"
22
+LD_LIBRARY_PATH=/usr/lib/ser
22 23
 
23 24
 test -f $DAEMON || exit 0
24 25
 
26
+export LD_LIBRARY_PATH
25 27
 set -e
26 28
 
27 29
 case "$1" in
... ...
@@ -56,8 +58,9 @@ case "$1" in
56 58
 	#	just the same as "restart".
57 59
 	#
58 60
 	# Check if ser configuration is valid before restarting the server
59
-	out=`($DAEMON -c >/dev/null || true) 2>&1`
60
-	if [ "$out" != 'config file ok, exiting...' ]; then
61
+        (($DAEMON -c 2>&1) | grep "config file ok, exiting") > /dev/null
62
+	if [ $? -ne 0 ]; then
63
+            ($DAEMON -c 2>&1)
61 64
 	    echo -e "\nThere are errors in the configuration file. Please fix them first"
62 65
 	    echo -e "\n$out\n"
63 66
 	    exit 0
Browse code

Check if ser configuration is valid before restarting the server. If configuration is broken, fix it, then do again:

/etc/init.d/ser restart

Valid for restarts only (start/stop not affected).

Adrian Georgescu authored on 23/01/2004 10:53:17
Showing 1 changed files
... ...
@@ -55,6 +55,13 @@ case "$1" in
55 55
 	#	option to the "reload" entry above. If not, "force-reload" is
56 56
 	#	just the same as "restart".
57 57
 	#
58
+	# Check if ser configuration is valid before restarting the server
59
+	out=`($DAEMON -c >/dev/null || true) 2>&1`
60
+	if [ "$out" != 'config file ok, exiting...' ]; then
61
+	    echo -e "\nThere are errors in the configuration file. Please fix them first"
62
+	    echo -e "\n$out\n"
63
+	    exit 0
64
+	fi
58 65
 	echo -n "Restarting $DESC: $NAME"
59 66
 	start-stop-daemon --oknodo --stop --quiet --pidfile \
60 67
 		$PIDFILE --exec $DAEMON
Browse code

- merged from stable (rel0_8_11): - kill_all_children (fixes 'we kill our launching script bug ') - debian updates - tm & sl destroy when not init fixes - ver no. updated

Andrei Pelinescu-Onciul authored on 30/06/2003 15:48:44
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,74 @@
1
+#! /bin/sh
2
+#
3
+# skeleton	example file to build /etc/init.d/ scripts.
4
+#		This file should be used to construct scripts for /etc/init.d.
5
+#
6
+#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
7
+#		Modified for Debian GNU/Linux
8
+#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
9
+#
10
+# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
11
+#
12
+#  adapted for ser by Andrei Pelinescu-Onciul <pelinescu-onciul@fokus.gmd.de>
13
+# $Id$
14
+
15
+
16
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
17
+DAEMON=/usr/sbin/ser
18
+NAME=ser
19
+DESC=ser
20
+PIDFILE=/var/run/$NAME/$NAME.pid
21
+PARAMS="-P $PIDFILE -u ser -g ser"
22
+
23
+test -f $DAEMON || exit 0
24
+
25
+set -e
26
+
27
+case "$1" in
28
+  start)
29
+	echo -n "Starting $DESC: $NAME"
30
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
31
+		--exec $DAEMON -- $PARAMS
32
+	echo "."
33
+	;;
34
+  stop)
35
+	echo -n "Stopping $DESC: $NAME"
36
+	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
37
+		--exec $DAEMON
38
+	echo "."
39
+	;;
40
+  #reload)
41
+	#
42
+	#	If the daemon can reload its config files on the fly
43
+	#	for example by sending it SIGHUP, do it here.
44
+	#
45
+	#	If the daemon responds to changes in its config file
46
+	#	directly anyway, make this a do-nothing entry.
47
+	#
48
+	# echo "Reloading $DESC configuration files."
49
+	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
50
+	#	$PIDFILE --exec $DAEMON
51
+  #;;
52
+  restart|force-reload)
53
+	#
54
+	#	If the "reload" option is implemented, move the "force-reload"
55
+	#	option to the "reload" entry above. If not, "force-reload" is
56
+	#	just the same as "restart".
57
+	#
58
+	echo -n "Restarting $DESC: $NAME"
59
+	start-stop-daemon --oknodo --stop --quiet --pidfile \
60
+		$PIDFILE --exec $DAEMON
61
+	sleep 1
62
+	start-stop-daemon --start --quiet --pidfile \
63
+		$PIDFILE --exec $DAEMON  -- $PARAMS
64
+	echo "."
65
+	;;
66
+  *)
67
+	N=/etc/init.d/$NAME
68
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
69
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
70
+	exit 1
71
+	;;
72
+esac
73
+
74
+exit 0