oversip 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,3 +10,16 @@ USER=oversip
10
10
 
11
11
  # Group to run as.
12
12
  GROUP=oversip
13
+
14
+ # Directory with the configuration files.
15
+ # By default '/etc/oversip/'.
16
+ #CONFIG_DIR=/etc/oversip/
17
+
18
+ # Main configuration file name (within the configuration directory).
19
+ # By default 'oversip.conf'.
20
+ #CONFIG_FILE=oversip.conf
21
+
22
+ # Number of OverSIP instances that will run together in this host.
23
+ # This parameter is just for some resources allocation, it does not run N instances!
24
+ # By default 1.
25
+ #NUM_INSTANCES=1
data/debian/oversip.init CHANGED
@@ -11,14 +11,16 @@
11
11
  ### END INIT INFO
12
12
 
13
13
  PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/var/lib/gems/1.9.1/bin
14
- NAME=oversip
15
14
  DESC=OverSIP
16
- HOMEDIR=/var/run/$NAME
17
- PIDFILE_NAME=$NAME.pid
15
+ HOMEDIR=/var/run/oversip
18
16
  RUN=no
19
- RUBY_GEM=$NAME
17
+ RUBY_GEM=oversip
20
18
  RUBY_EXE=ruby1.9.1
21
19
 
20
+ # Process name, it affects to the process name, Posix Message Queue name and PID file.
21
+ # The configuration file under /etc/default/ to read will also be called $NAME.
22
+ NAME=oversip
23
+
22
24
 
23
25
  . /lib/lsb/init-functions
24
26
 
@@ -30,53 +32,51 @@ UBUNTU_LOGGING=0
30
32
  [ -r /etc/default/$NAME ] && . /etc/default/$NAME
31
33
 
32
34
 
33
- # Checks for the start action.
35
+ # Check for the start/restart/force-reload actions.
34
36
  if [ "$1" == "start" ] || [ "$1" == "restart" ] || [ "$1" == "force-reload" ] ; then
35
-
36
37
  # Ensure that the admin has set RUN=yes in /etc/default/$NAME file.
37
38
  if [ "$RUN" != "yes" ] ; then
38
39
  log_failure_msg "$DESC ($NAME) not yet configured. Set RUN=yes in /etc/default/$NAME."
39
40
  exit 0
40
41
  fi
42
+ fi
41
43
 
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."
46
- log_end_msg 5
47
- exit 5
48
- fi
49
-
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."
44
+ # Ensure Ruby executable is installed.
45
+ which $RUBY_EXE >/dev/null
46
+ if [ $? -ne 0 ] ; then
47
+ log_failure_msg "ruby1.9.1 is not installed, exiting."
48
+ log_end_msg 5
49
+ exit 5
50
+ fi
54
51
 
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
52
+ # Check whether OverSIP Ruby Gem is installed and get the executable location.
53
+ DAEMON=$(which oversip)
54
+ if [ $? -ne 0 ] ; then
55
+ log_failure_msg "$DESC ($NAME): Ruby Gem '$RUBY_GEM' is not installed, exiting."
68
56
 
57
+ case "$1" in
58
+ status)
59
+ # LSB - 4: program or service status is unknown.
60
+ log_end_msg 4
61
+ exit 4
62
+ ;;
63
+ *)
64
+ # LSB - 5: program is not installed.
65
+ log_end_msg 5
66
+ exit 5
67
+ ;;
68
+ esac
69
69
  fi
70
70
 
71
71
 
72
- PIDFILE="${HOMEDIR}/${PIDFILE_NAME}"
73
- OPTIONS="-P ${PIDFILE}"
74
- if [ -n "$USER" ] ; then
75
- OPTIONS="${OPTIONS} -u ${USER}"
76
- fi
77
- if [ -n "$GROUP" ] ; then
78
- OPTIONS="${OPTIONS} -g ${GROUP}"
79
- fi
72
+ PIDFILE="${HOMEDIR}/${NAME}.pid"
73
+ OPTIONS="-P ${PIDFILE} -p ${NAME}"
74
+
75
+ if [ -n "$USER" ] ; then OPTIONS="${OPTIONS} -u ${USER}" ; fi
76
+ if [ -n "$GROUP" ] ; then OPTIONS="${OPTIONS} -g ${GROUP}" ; fi
77
+ if [ -n "$CONFIG_DIR" ] ; then OPTIONS="${OPTIONS} --config-dir ${CONFIG_DIR}" ; fi
78
+ if [ -n "$CONFIG_FILE" ] ; then OPTIONS="${OPTIONS} --config-file ${CONFIG_FILE}" ; fi
79
+ if [ -n "$NUM_INSTANCES" ] ; then OPTIONS="${OPTIONS} --num-instances ${NUM_INSTANCES}" ; fi
80
80
 
81
81
 
82
82
  check_homedir()
@@ -162,8 +162,7 @@ case "$1" in
162
162
  echo
163
163
  set +e
164
164
 
165
- start-stop-daemon --oknodo --stop --pidfile $PIDFILE --quiet \
166
- --name $NAME
165
+ start-stop-daemon --oknodo --stop --pidfile $PIDFILE --quiet
167
166
  res=$?
168
167
 
169
168
  if [ $res -eq 0 ] ; then
@@ -186,8 +185,7 @@ case "$1" in
186
185
  echo
187
186
  set +e
188
187
 
189
- start-stop-daemon --oknodo --stop --pidfile $PIDFILE --retry=5 --quiet \
190
- --name $NAME
188
+ start-stop-daemon --oknodo --stop --pidfile $PIDFILE --retry=5 --quiet
191
189
 
192
190
  if [ $? -ne 0 ] ; then
193
191
  log_failure_msg "error, failed to stop."
data/debian/preinst CHANGED
@@ -6,7 +6,7 @@ set -e
6
6
 
7
7
  #DEBHELPER#
8
8
 
9
- OVERSIP_GEM_VERSION="~>1.0.3"
9
+ OVERSIP_GEM_VERSION="~>1.0.4"
10
10
 
11
11
  case "$1" in
12
12
 
@@ -5,7 +5,7 @@ module OverSIP
5
5
  module Version
6
6
  MAJOR = 1
7
7
  MINOR = 0
8
- TINY = 3
8
+ TINY = 4
9
9
  end
10
10
 
11
11
  PROGRAM_NAME = "OverSIP"
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: 1.0.3
4
+ version: 1.0.4
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-25 00:00:00.000000000 Z
12
+ date: 2012-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine-le
16
- requirement: &13970320 !ruby/object:Gem::Requirement
16
+ requirement: &12671300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.1.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *13970320
24
+ version_requirements: *12671300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: iobuffer
27
- requirement: &13969800 !ruby/object:Gem::Requirement
27
+ requirement: &12670760 !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: *13969800
35
+ version_requirements: *12670760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: em-posixmq
38
- requirement: &13969120 !ruby/object:Gem::Requirement
38
+ requirement: &12669960 !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: *13969120
46
+ version_requirements: *12669960
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: em-udns
49
- requirement: &13968220 !ruby/object:Gem::Requirement
49
+ requirement: &12669120 !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: *13968220
57
+ version_requirements: *12669120
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: escape_utils
60
- requirement: &13967120 !ruby/object:Gem::Requirement
60
+ requirement: &12667940 !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: *13967120
68
+ version_requirements: *12667940
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: term-ansicolor
71
- requirement: &13966420 !ruby/object:Gem::Requirement
71
+ requirement: &12667360 !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: *13966420
79
+ version_requirements: *12667360
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: posix-spawn
82
- requirement: &13965860 !ruby/object:Gem::Requirement
82
+ requirement: &12666820 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 0.3.6
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *13965860
90
+ version_requirements: *12666820
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rake
93
- requirement: &13965060 !ruby/object:Gem::Requirement
93
+ requirement: &12665940 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: 0.9.2
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *13965060
101
+ version_requirements: *12665940
102
102
  description: ! "OverSIP is an async SIP server. Built on top of Ruby EventMachine\n
103
103
  \ library it follows the Reactor Pattern, allowing thousands of concurrent connections
104
104
  and requests\n handled by a single processor in a never-blocking fashion. It