summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@koumbit.org>2015-06-18 16:43:17 -0400
committerAntoine Beaupré <anarcat@koumbit.org>2015-06-18 17:15:28 -0400
commit7b99c89edf698d295dc21aba97800166c7961cf9 (patch)
tree80779210889799033ab90426f059429fb627a747 /manifests
parent50685a8bc739d28ab1df830c707d1091a94c08bb (diff)
make autossh fork properly
Diffstat (limited to 'manifests')
-rw-r--r--manifests/autossh.pp9
1 files changed, 5 insertions, 4 deletions
diff --git a/manifests/autossh.pp b/manifests/autossh.pp
index fadc575..1ded7eb 100644
--- a/manifests/autossh.pp
+++ b/manifests/autossh.pp
@@ -1,7 +1,8 @@
class sshd::autossh($host,
- $port = undef, # this should be a remote->local hash
- $remote_user = undef,
- $user = 'root',
+ $port = undef, # this should be a remote->local hash
+ $remote_user = undef,
+ $user = 'root',
+ $pidfile = '/var/run/autossh.pid',
) {
if $port {
$port_ensure = $port
@@ -22,7 +23,7 @@ class sshd::autossh($host,
source => 'puppet:///modules/sshd/autossh.init.d';
'/etc/default/autossh':
mode => '0444',
- content => "USER=$user\nDAEMON_ARGS='-o ServerAliveInterval=15 -o ServerAliveCountMax=4 -q -N -R $port_ensure:localhost:22 $remote_user_ensure@$host'\n";
+ content => "USER=$user\nPIDFILE=$pidfile\nDAEMON_ARGS='-f -o ServerAliveInterval=15 -o ServerAliveCountMax=4 -q -N -R $port_ensure:localhost:22 $remote_user_ensure@$host'\n";
}
package { 'autossh':
ensure => present,