networker: Fixed running nsrports command.
This commit is contained in:
parent
bd8a63f0da
commit
cada7e0d69
1 changed files with 6 additions and 5 deletions
|
@ -5,6 +5,8 @@ class networker::common {
|
|||
|
||||
require portmap::server
|
||||
|
||||
$range = inline_template('7937-<%= 7936 + @ports.to_i %>')
|
||||
|
||||
file { [ "/nsr", "/nsr/res", ]:
|
||||
ensure => directory,
|
||||
mode => "0755",
|
||||
|
@ -23,7 +25,7 @@ class networker::common {
|
|||
}
|
||||
|
||||
exec { "nsrports":
|
||||
command => "nsrports -S 7937-7940",
|
||||
command => "nsrports -S ${range}",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
unless => "nsrports | egrep '^Service ports: ${range}[[:space:]]$'",
|
||||
require => Service["networker"],
|
||||
|
@ -40,6 +42,9 @@ class networker::common {
|
|||
#
|
||||
class networker::client {
|
||||
|
||||
if !$ports {
|
||||
$ports = 4
|
||||
}
|
||||
include networker::common
|
||||
|
||||
package { "lgtoclnt":
|
||||
|
@ -94,9 +99,5 @@ class networker::server($datadir="/nsr", $ports=8) inherits networker::common {
|
|||
}
|
||||
}
|
||||
|
||||
Exec["nsrports"] {
|
||||
command => inline_template('nsrports -S 7937-<%= 7936 + @ports.to_i %>'),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue