oversip 0.9.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/debian/control +1 -1
- data/debian/oversip.init +37 -46
- data/debian/postinst +26 -14
- data/debian/postrm +8 -2
- data/etc/oversip.conf +1 -1
- data/lib/oversip/master_process.rb +0 -1
- data/lib/oversip/syslogger_process.rb +1 -1
- data/lib/oversip/version.rb +3 -3
- metadata +16 -16
data/debian/control
CHANGED
@@ -8,7 +8,7 @@ Standards-Version: 3.9.3
|
|
8
8
|
|
9
9
|
Package: oversip
|
10
10
|
Architecture: all
|
11
|
-
Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.9.1, ruby1.9.1-dev, make, g++, libssl-dev, libev-dev
|
11
|
+
Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.9.1, ruby1.9.1-dev, make, g++, libssl-dev, libev-dev
|
12
12
|
Recommends: unbound
|
13
13
|
Description: OverSIP (the SIP dreams factory) is an async SIP proxy/server programmable in Ruby language.
|
14
14
|
Some features of OverSIP are:
|
data/debian/oversip.init
CHANGED
@@ -29,54 +29,45 @@ UBUNTU_LOGGING=0
|
|
29
29
|
|
30
30
|
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
31
31
|
|
32
|
-
# Ensure Ruby executable is installed.
|
33
|
-
which $RUBY_EXE >/dev/null
|
34
|
-
if [ $? -ne 0 ] ; then
|
35
|
-
log_failure_msg "ruby1.9.1 is not installed, exiting."
|
36
|
-
log_end_msg 5
|
37
|
-
exit 5
|
38
|
-
fi
|
39
32
|
|
40
|
-
#
|
41
|
-
|
42
|
-
if [ $? -ne 0 ] ; then
|
43
|
-
log_failure_msg "$DESC ($NAME): Ruby Gem '$RUBY_GEM' is not installed, exiting."
|
33
|
+
# Checks for the start action.
|
34
|
+
if [ "$1" == "start" ] ; then
|
44
35
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
36
|
+
# Ensure that the admin has set RUN=yes in /etc/default/$NAME file.
|
37
|
+
if [ "$RUN" != "yes" ] ; then
|
38
|
+
log_failure_msg "$DESC ($NAME) not yet configured. Set RUN=yes in /etc/default/$NAME."
|
39
|
+
exit 0
|
40
|
+
fi
|
41
|
+
|
42
|
+
# Ensure Ruby executable is installed.
|
43
|
+
which $RUBY_EXE >/dev/null
|
44
|
+
if [ $? -ne 0 ] ; then
|
45
|
+
log_failure_msg "ruby1.9.1 is not installed, exiting."
|
53
46
|
log_end_msg 5
|
54
47
|
exit 5
|
55
|
-
|
56
|
-
esac
|
57
|
-
fi
|
48
|
+
fi
|
58
49
|
|
59
|
-
|
60
|
-
|
50
|
+
# Check whether OverSIP Ruby Gem is installed and get the executable location.
|
51
|
+
DAEMON=$(which $NAME)
|
52
|
+
if [ $? -ne 0 ] ; then
|
53
|
+
log_failure_msg "$DESC ($NAME): Ruby Gem '$RUBY_GEM' is not installed, exiting."
|
54
|
+
|
55
|
+
case "$1" in
|
56
|
+
status)
|
57
|
+
# LSB - 4: program or service status is unknown.
|
58
|
+
log_end_msg 4
|
59
|
+
exit 4
|
60
|
+
;;
|
61
|
+
*)
|
62
|
+
# LSB - 5: program is not installed.
|
63
|
+
log_end_msg 5
|
64
|
+
exit 5
|
65
|
+
;;
|
66
|
+
esac
|
67
|
+
fi
|
61
68
|
|
62
|
-
case "$1" in
|
63
|
-
status)
|
64
|
-
# LSB - 4: program or service status is unknown.
|
65
|
-
log_end_msg 4
|
66
|
-
exit 4
|
67
|
-
;;
|
68
|
-
*)
|
69
|
-
# LSB - 5: program is not installed.
|
70
|
-
log_end_msg 5
|
71
|
-
exit 5
|
72
|
-
;;
|
73
|
-
esac
|
74
69
|
fi
|
75
70
|
|
76
|
-
if [ "$RUN" != "yes" ] ; then
|
77
|
-
log_failure_msg "$DESC ($NAME) not yet configured. Set RUN=yes in /etc/default/$NAME."
|
78
|
-
exit 0
|
79
|
-
fi
|
80
71
|
|
81
72
|
PIDFILE="${HOMEDIR}/${PIDFILE_NAME}"
|
82
73
|
OPTIONS="-P ${PIDFILE}"
|
@@ -147,14 +138,13 @@ case "$1" in
|
|
147
138
|
--name $NAME
|
148
139
|
res=$?
|
149
140
|
|
150
|
-
# Posix MQueue for syslogging is created with owner root (to ensure
|
151
|
-
# rlimits and so) so it cannot be deleted by $USER when stopping the
|
152
|
-
# server. This command removes the mqueue when performing the "stop"
|
153
|
-
# action.
|
154
|
-
$DAEMON --remove-mqueue "/${NAME}_syslogger"
|
155
|
-
|
156
141
|
if [ $res -eq 0 ] ; then
|
157
142
|
log_end_msg 0
|
143
|
+
# Posix MQueue for syslogging is created with owner root (to ensure
|
144
|
+
# rlimits and so) so it cannot be deleted by a non root user when
|
145
|
+
# stopping the server. This command removes the mqueue when performing
|
146
|
+
# the "stop" action.
|
147
|
+
$DAEMON --remove-mqueue "/${NAME}_syslogger" 2>/dev/null
|
158
148
|
exit 0
|
159
149
|
else
|
160
150
|
log_failure_msg "error, failed to stop."
|
@@ -200,4 +190,5 @@ case "$1" in
|
|
200
190
|
log_failure_msg "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload|status}."
|
201
191
|
exit 1
|
202
192
|
;;
|
193
|
+
|
203
194
|
esac
|
data/debian/postinst
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/bin/bash
|
2
2
|
|
3
3
|
set -e
|
4
4
|
|
5
|
+
|
6
|
+
#DEBHELPER#
|
7
|
+
|
8
|
+
OVERSIP_GEM_VERSION="~>1.0.0"
|
9
|
+
|
5
10
|
# summary of how this script can be called:
|
6
11
|
# * <postinst> `configure' <most-recently-configured-version>
|
7
12
|
# * <old-postinst> `abort-upgrade' <new version>
|
@@ -21,19 +26,26 @@ set -e
|
|
21
26
|
# `abort-remove' or `abort-deconfigure'.
|
22
27
|
|
23
28
|
case "$1" in
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
29
|
+
configure)
|
30
|
+
# Add a Debian system user/group called "oversip".
|
31
|
+
adduser --quiet --system --group --disabled-password \
|
32
|
+
--shell /bin/false --gecos "OverSIP" \
|
33
|
+
--home /var/run/oversip oversip || true
|
34
|
+
|
35
|
+
# Install the Ruby gem.
|
36
|
+
echo "installing 'oversip' Ruby Gem (version $OVERSIP_GEM_VERSION)..."
|
37
|
+
gem1.9.1 install oversip --no-rdoc --no-ri --conservative -v $OVERSIP_GEM_VERSION
|
38
|
+
;;
|
39
|
+
|
40
|
+
abort-upgrade|abort-remove|abort-deconfigure)
|
41
|
+
;;
|
42
|
+
|
43
|
+
*)
|
44
|
+
echo "postinst called with unknown argument \`$1'" >&2
|
45
|
+
exit 1
|
46
|
+
;;
|
37
47
|
esac
|
38
48
|
|
49
|
+
exit 0
|
50
|
+
|
39
51
|
#DEBHELPER#
|
data/debian/postrm
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/bin/bash
|
2
2
|
|
3
3
|
#DEBHELPER#
|
4
4
|
|
5
5
|
if [ "$1" = "purge" ] ; then
|
6
|
-
#
|
6
|
+
# Remove the Debian system user/group.
|
7
7
|
deluser --quiet --remove-home oversip &>/dev/null || true
|
8
|
+
|
9
|
+
# Remove the Ruby gem.
|
10
|
+
echo "uninstalling 'oversip' Ruby Gem..."
|
11
|
+
gem1.9.1 uninstall oversip -a -x
|
8
12
|
fi
|
9
13
|
|
10
14
|
exit 0
|
15
|
+
|
16
|
+
#DEBHELPER#
|
data/etc/oversip.conf
CHANGED
@@ -7,10 +7,10 @@ require "syslog"
|
|
7
7
|
|
8
8
|
gem "eventmachine-le", ">= 1.1.0"
|
9
9
|
require "eventmachine-le"
|
10
|
-
|
11
10
|
gem "em-posixmq", ">= 0.2.3"
|
12
11
|
require "em-posixmq"
|
13
12
|
|
13
|
+
|
14
14
|
# OverSIP libraries.
|
15
15
|
# (not required to be loaded as needed ones have been already
|
16
16
|
# loaded before forking).
|
data/lib/oversip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oversip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine-le
|
16
|
-
requirement: &
|
16
|
+
requirement: &18605540 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *18605540
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: iobuffer
|
27
|
-
requirement: &
|
27
|
+
requirement: &18605080 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.1.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *18605080
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: em-posixmq
|
38
|
-
requirement: &
|
38
|
+
requirement: &18604620 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.2.3
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *18604620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: em-udns
|
49
|
-
requirement: &
|
49
|
+
requirement: &18604160 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.3.6
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *18604160
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: escape_utils
|
60
|
-
requirement: &
|
60
|
+
requirement: &18603700 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.2.4
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *18603700
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: term-ansicolor
|
71
|
-
requirement: &
|
71
|
+
requirement: &18603320 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *18603320
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: posix-spawn
|
82
|
-
requirement: &
|
82
|
+
requirement: &18602860 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *18602860
|
91
91
|
description: ! "OverSIP is an async SIP server. Built on top of Ruby EventMachine\n
|
92
92
|
\ library it follows the Reactor Pattern, allowing thousands of concurrent connections
|
93
93
|
and requests\n handled by a single processor in a never-blocking fashion. It
|