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 100755
... ...
@@ -1,136 +0,0 @@
1
-#! /bin/sh
2
-# Copyright (c) 2002 Frauenhofer Gesellschaft FOKUS, Germany.
3
-# All rights reserved.
4
-#
5
-# Author: Nils Ohlmeier <ohlmeier@fokus.fhg.de>
6
-#
7
-# /etc/init.d/ser
8
-#
9
-### BEGIN INIT INFO
10
-# Provides:          sip
11
-# Required-Start:    $network
12
-# X-UnitedLinux-Should-Start: $network
13
-# Required-Stop:     $network
14
-# X-UnitedLinux-Should-Stop: $network
15
-# Default-Start:     3 5
16
-# Default-Stop:      0 1 2 6
17
-# Short-Description: SIP Express Router
18
-# Description:       Start SER and provide the routing of SIP requests.
19
-### END INIT INFO
20
-
21
-
22
-# Check for missing binaries (stale symlinks should not happen)
23
-SER_BIN=/usr/sbin/ser
24
-test -x $SER_BIN || exit 5
25
-
26
-# Check for existence of needed config file and read it
27
-SER_CONFIG=/etc/ser/ser.cfg
28
-test -r $SER_CONFIG || exit 6
29
-#. $FOO_CONFIG
30
-
31
-# Shell functions sourced from /etc/rc.status:
32
-#      rc_check         check and set local and overall rc status
33
-#      rc_status        check and set local and overall rc status
34
-#      rc_status -v     ditto but be verbose in local rc status
35
-#      rc_status -v -r  ditto and clear the local rc status
36
-#      rc_status -s     display "skipped" and exit with status 3
37
-#      rc_status -u     display "unused" and exit with status 3
38
-#      rc_failed        set local and overall rc status to failed
39
-#      rc_failed <num>  set local and overall rc status to <num>
40
-#      rc_reset         clear local rc status (overall remains)
41
-#      rc_exit          exit appropriate to overall rc status
42
-#      rc_active	checks whether a service is activated by symlinks
43
-#      rc_splash arg    sets the boot splash screen to arg (if active)
44
-. /etc/rc.status
45
-
46
-# Reset status of this service
47
-rc_reset
48
-
49
-# Return values acc. to LSB for all commands but status:
50
-# 0	  - success
51
-# 1       - generic or unspecified error
52
-# 2       - invalid or excess argument(s)
53
-# 3       - unimplemented feature (e.g. "reload")
54
-# 4       - user had insufficient privileges
55
-# 5       - program is not installed
56
-# 6       - program is not configured
57
-# 7       - program is not running
58
-# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
59
-# 
60
-# Note that starting an already running service, stopping
61
-# or restarting a not-running service as well as the restart
62
-# with force-reload (in case signaling is not supported) are
63
-# considered a success.
64
-
65
-case "$1" in
66
-    start)
67
-	echo -n "Starting SIP Express Router "
68
-	## Start daemon with startproc(8). If this fails
69
-	## the return value is set appropriately by startproc.
70
-	startproc $SER_BIN -f $SER_CONFIG
71
-
72
-	# Remember status and be verbose
73
-	rc_status -v
74
-	;;
75
-    stop)
76
-	echo -n "Shutting down SIP Express Router "
77
-	## Stop daemon with killproc(8) and if this fails
78
-	## killproc sets the return value according to LSB.
79
-
80
-	killproc -TERM $SER_BIN
81
-
82
-	# Remember status and be verbose
83
-	rc_status -v
84
-	;;
85
-    restart)
86
-	## Stop the service and regardless of whether it was
87
-	## running or not, start it again.
88
-	$0 stop
89
-	$0 start
90
-
91
-	# Remember status and be quiet
92
-	rc_status
93
-	;;
94
-    force-reload)
95
-	## Signal the daemon to reload its config. Most daemons
96
-	## do this on signal 1 (SIGHUP).
97
-	## If it does not support it, restart.
98
-
99
-	echo -n "Reload service SIP Express Router "
100
-	## Otherwise:
101
-	$0 stop  &&  $0 start
102
-	rc_status
103
-	;;
104
-    reload)
105
-	## Like force-reload, but if daemon does not support
106
-	## signaling, do nothing (!)
107
-
108
-	## Otherwise if it does not support reload:
109
-	rc_failed 3
110
-	rc_status -v
111
-	;;
112
-    status)
113
-	echo -n "Checking for service SIP Express Router "
114
-	## Check status with checkproc(8), if process is running
115
-	## checkproc will return with exit status 0.
116
-
117
-	# Return value is slightly different for the status command:
118
-	# 0 - service up and running
119
-	# 1 - service dead, but /var/run/  pid  file exists
120
-	# 2 - service dead, but /var/lock/ lock file exists
121
-	# 3 - service not running (unused)
122
-	# 4 - service status unknown :-(
123
-	# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
124
-	
125
-	# NOTE: checkproc returns LSB compliant status values.
126
-	checkproc $SER_BIN
127
-	# NOTE: rc_status knows that we called this init script with
128
-	# "status" option and adapts its messages accordingly.
129
-	rc_status -v
130
-	;;
131
-    *)
132
-	echo "Usage: $0 {start|stop|status|restart}"
133
-	exit 1
134
-	;;
135
-esac
136
-rc_exit
Browse code

Added configuration file as starting arg (on Jiris request :-)

Nils Ohlmeier authored on 04/07/2003 04:15:41
Showing 1 changed files
... ...
@@ -67,7 +67,7 @@ case "$1" in
67 67
 	echo -n "Starting SIP Express Router "
68 68
 	## Start daemon with startproc(8). If this fails
69 69
 	## the return value is set appropriately by startproc.
70
-	startproc $SER_BIN
70
+	startproc $SER_BIN -f $SER_CONFIG
71 71
 
72 72
 	# Remember status and be verbose
73 73
 	rc_status -v
Browse code

Changes and improvements for SuSE 8.1.

Nils Ohlmeier authored on 29/10/2002 22:36:23
Showing 1 changed files
... ...
@@ -1,75 +1,81 @@
1 1
 #! /bin/sh
2 2
 # Copyright (c) 2002 Frauenhofer Gesellschaft FOKUS, Germany.
3
+# All rights reserved.
3 4
 #
4 5
 # Author: Nils Ohlmeier <ohlmeier@fokus.fhg.de>
5 6
 #
6 7
 # /etc/init.d/ser
7 8
 #
8 9
 ### BEGIN INIT INFO
9
-# Provides: sip
10
-# Required-Start: $network
11
-# Required-Stop:  $network
12
-# Default-Start:  3 5
13
-# Default-Stop:   0 1 2 6
14
-# Description:    Start the SIP Express Router.
10
+# Provides:          sip
11
+# Required-Start:    $network
12
+# X-UnitedLinux-Should-Start: $network
13
+# Required-Stop:     $network
14
+# X-UnitedLinux-Should-Stop: $network
15
+# Default-Start:     3 5
16
+# Default-Stop:      0 1 2 6
17
+# Short-Description: SIP Express Router
18
+# Description:       Start SER and provide the routing of SIP requests.
15 19
 ### END INIT INFO
16 20
 
17
-# Source SuSE config
18
-. /etc/rc.config
19
-
20
-# Determine the base and follow a runlevel link name.
21
-base=${0##*/}
22
-link=${base#*[SK][0-9][0-9]}
23 21
 
22
+# Check for missing binaries (stale symlinks should not happen)
24 23
 SER_BIN=/usr/sbin/ser
25 24
 test -x $SER_BIN || exit 5
26 25
 
26
+# Check for existence of needed config file and read it
27
+SER_CONFIG=/etc/ser/ser.cfg
28
+test -r $SER_CONFIG || exit 6
29
+#. $FOO_CONFIG
30
+
27 31
 # Shell functions sourced from /etc/rc.status:
28 32
 #      rc_check         check and set local and overall rc status
29 33
 #      rc_status        check and set local and overall rc status
30 34
 #      rc_status -v     ditto but be verbose in local rc status
31 35
 #      rc_status -v -r  ditto and clear the local rc status
36
+#      rc_status -s     display "skipped" and exit with status 3
37
+#      rc_status -u     display "unused" and exit with status 3
32 38
 #      rc_failed        set local and overall rc status to failed
33
-#      rc_failed <num>  set local and overall rc status to <num><num>
39
+#      rc_failed <num>  set local and overall rc status to <num>
34 40
 #      rc_reset         clear local rc status (overall remains)
35 41
 #      rc_exit          exit appropriate to overall rc status
42
+#      rc_active	checks whether a service is activated by symlinks
43
+#      rc_splash arg    sets the boot splash screen to arg (if active)
36 44
 . /etc/rc.status
37 45
 
38
-# First reset status of this service
46
+# Reset status of this service
39 47
 rc_reset
40 48
 
41 49
 # Return values acc. to LSB for all commands but status:
42
-# 0 - success
43
-# 1 - generic or unspecified error
44
-# 2 - invalid or excess argument(s)
45
-# 3 - unimplemented feature (e.g. "reload")
46
-# 4 - insufficient privilege
47
-# 5 - program is not installed
48
-# 6 - program is not configured
49
-# 7 - program is not running
50
+# 0	  - success
51
+# 1       - generic or unspecified error
52
+# 2       - invalid or excess argument(s)
53
+# 3       - unimplemented feature (e.g. "reload")
54
+# 4       - user had insufficient privileges
55
+# 5       - program is not installed
56
+# 6       - program is not configured
57
+# 7       - program is not running
58
+# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
50 59
 # 
51 60
 # Note that starting an already running service, stopping
52 61
 # or restarting a not-running service as well as the restart
53
-# with force-reload (in case signalling is not supported) are
62
+# with force-reload (in case signaling is not supported) are
54 63
 # considered a success.
55 64
 
56 65
 case "$1" in
57 66
     start)
58
-	echo -n "Starting SIP Express Router"
67
+	echo -n "Starting SIP Express Router "
59 68
 	## Start daemon with startproc(8). If this fails
60
-	## the echo return value is set appropriate.
61
-
62
-	# NOTE: startproc return 0, even if service is 
63
-	# already running to match LSB spec.
69
+	## the return value is set appropriately by startproc.
64 70
 	startproc $SER_BIN
65 71
 
66 72
 	# Remember status and be verbose
67 73
 	rc_status -v
68 74
 	;;
69 75
     stop)
70
-	echo -n "Shutting down SIP Express Router"
76
+	echo -n "Shutting down SIP Express Router "
71 77
 	## Stop daemon with killproc(8) and if this fails
72
-	## set echo the echo return value.
78
+	## killproc sets the return value according to LSB.
73 79
 
74 80
 	killproc -TERM $SER_BIN
75 81
 
... ...
@@ -90,32 +96,36 @@ case "$1" in
90 96
 	## do this on signal 1 (SIGHUP).
91 97
 	## If it does not support it, restart.
92 98
 
93
-	echo -n "Reload service SIP Express Router"
99
+	echo -n "Reload service SIP Express Router "
94 100
 	## Otherwise:
95 101
 	$0 stop  &&  $0 start
96 102
 	rc_status
97 103
 	;;
98 104
     reload)
99 105
 	## Like force-reload, but if daemon does not support
100
-	## signalling, do nothing (!)
106
+	## signaling, do nothing (!)
101 107
 
102 108
 	## Otherwise if it does not support reload:
103 109
 	rc_failed 3
104 110
 	rc_status -v
105 111
 	;;
106 112
     status)
107
-	echo -n "Checking for SIP Express Router: "
113
+	echo -n "Checking for service SIP Express Router "
108 114
 	## Check status with checkproc(8), if process is running
109 115
 	## checkproc will return with exit status 0.
110 116
 
111
-	# Status has a slightly different for the status command:
112
-	# 0 - service running
117
+	# Return value is slightly different for the status command:
118
+	# 0 - service up and running
113 119
 	# 1 - service dead, but /var/run/  pid  file exists
114 120
 	# 2 - service dead, but /var/lock/ lock file exists
115
-	# 3 - service not running
116
-
121
+	# 3 - service not running (unused)
122
+	# 4 - service status unknown :-(
123
+	# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
124
+	
117 125
 	# NOTE: checkproc returns LSB compliant status values.
118 126
 	checkproc $SER_BIN
127
+	# NOTE: rc_status knows that we called this init script with
128
+	# "status" option and adapts its messages accordingly.
119 129
 	rc_status -v
120 130
 	;;
121 131
     *)
Browse code

Intial checkin

Nils Ohlmeier authored on 06/09/2002 01:02:32
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,126 @@
1
+#! /bin/sh
2
+# Copyright (c) 2002 Frauenhofer Gesellschaft FOKUS, Germany.
3
+#
4
+# Author: Nils Ohlmeier <ohlmeier@fokus.fhg.de>
5
+#
6
+# /etc/init.d/ser
7
+#
8
+### BEGIN INIT INFO
9
+# Provides: sip
10
+# Required-Start: $network
11
+# Required-Stop:  $network
12
+# Default-Start:  3 5
13
+# Default-Stop:   0 1 2 6
14
+# Description:    Start the SIP Express Router.
15
+### END INIT INFO
16
+
17
+# Source SuSE config
18
+. /etc/rc.config
19
+
20
+# Determine the base and follow a runlevel link name.
21
+base=${0##*/}
22
+link=${base#*[SK][0-9][0-9]}
23
+
24
+SER_BIN=/usr/sbin/ser
25
+test -x $SER_BIN || exit 5
26
+
27
+# Shell functions sourced from /etc/rc.status:
28
+#      rc_check         check and set local and overall rc status
29
+#      rc_status        check and set local and overall rc status
30
+#      rc_status -v     ditto but be verbose in local rc status
31
+#      rc_status -v -r  ditto and clear the local rc status
32
+#      rc_failed        set local and overall rc status to failed
33
+#      rc_failed <num>  set local and overall rc status to <num><num>
34
+#      rc_reset         clear local rc status (overall remains)
35
+#      rc_exit          exit appropriate to overall rc status
36
+. /etc/rc.status
37
+
38
+# First reset status of this service
39
+rc_reset
40
+
41
+# Return values acc. to LSB for all commands but status:
42
+# 0 - success
43
+# 1 - generic or unspecified error
44
+# 2 - invalid or excess argument(s)
45
+# 3 - unimplemented feature (e.g. "reload")
46
+# 4 - insufficient privilege
47
+# 5 - program is not installed
48
+# 6 - program is not configured
49
+# 7 - program is not running
50
+# 
51
+# Note that starting an already running service, stopping
52
+# or restarting a not-running service as well as the restart
53
+# with force-reload (in case signalling is not supported) are
54
+# considered a success.
55
+
56
+case "$1" in
57
+    start)
58
+	echo -n "Starting SIP Express Router"
59
+	## Start daemon with startproc(8). If this fails
60
+	## the echo return value is set appropriate.
61
+
62
+	# NOTE: startproc return 0, even if service is 
63
+	# already running to match LSB spec.
64
+	startproc $SER_BIN
65
+
66
+	# Remember status and be verbose
67
+	rc_status -v
68
+	;;
69
+    stop)
70
+	echo -n "Shutting down SIP Express Router"
71
+	## Stop daemon with killproc(8) and if this fails
72
+	## set echo the echo return value.
73
+
74
+	killproc -TERM $SER_BIN
75
+
76
+	# Remember status and be verbose
77
+	rc_status -v
78
+	;;
79
+    restart)
80
+	## Stop the service and regardless of whether it was
81
+	## running or not, start it again.
82
+	$0 stop
83
+	$0 start
84
+
85
+	# Remember status and be quiet
86
+	rc_status
87
+	;;
88
+    force-reload)
89
+	## Signal the daemon to reload its config. Most daemons
90
+	## do this on signal 1 (SIGHUP).
91
+	## If it does not support it, restart.
92
+
93
+	echo -n "Reload service SIP Express Router"
94
+	## Otherwise:
95
+	$0 stop  &&  $0 start
96
+	rc_status
97
+	;;
98
+    reload)
99
+	## Like force-reload, but if daemon does not support
100
+	## signalling, do nothing (!)
101
+
102
+	## Otherwise if it does not support reload:
103
+	rc_failed 3
104
+	rc_status -v
105
+	;;
106
+    status)
107
+	echo -n "Checking for SIP Express Router: "
108
+	## Check status with checkproc(8), if process is running
109
+	## checkproc will return with exit status 0.
110
+
111
+	# Status has a slightly different for the status command:
112
+	# 0 - service running
113
+	# 1 - service dead, but /var/run/  pid  file exists
114
+	# 2 - service dead, but /var/lock/ lock file exists
115
+	# 3 - service not running
116
+
117
+	# NOTE: checkproc returns LSB compliant status values.
118
+	checkproc $SER_BIN
119
+	rc_status -v
120
+	;;
121
+    *)
122
+	echo "Usage: $0 {start|stop|status|restart}"
123
+	exit 1
124
+	;;
125
+esac
126
+rc_exit