diff --git a/manifests/config.pp b/manifests/config.pp index e1a2007..3f762ee 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -28,7 +28,7 @@ ensure => directory, owner => $supervisord::user, group => $supervisord::group, - mode => '0644' + mode => '0755' } } diff --git a/manifests/install.pp b/manifests/install.pp index 26cfb37..ca5f335 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -12,6 +12,22 @@ unless => 'which supervisorctl', } } + elsif $::supervisord::package_provider == 'pipx' { + exec { 'pipx-install-supervisor': + user => root, + path => ['/usr/bin','/bin', '/usr/local/bin'], + command => "pipx install ${supervisord::package_name}", + unless => 'which supervisorctl', + } + file { '/usr/local/bin/supervisord': + ensure => link, + target => '/root/.local/bin/supervisord', + } + file { '/usr/local/bin/supervisorctl': + ensure => link, + target => '/root/.local/bin/supervisorctl', + } + } else { package { $supervisord::package_name: ensure => $supervisord::package_ensure, diff --git a/manifests/reload.pp b/manifests/reload.pp index 0fc68f8..9bd466f 100644 --- a/manifests/reload.pp +++ b/manifests/reload.pp @@ -3,19 +3,15 @@ # Class to reread and update supervisord with supervisorctl # class supervisord::reload inherits supervisord { - if $::supervisord::service_manage { - $supervisorctl = $::supervisord::executable_ctl + $supervisorctl = $::supervisord::executable_ctl - exec { 'supervisorctl_reread': - command => "${supervisorctl} reread", - refreshonly => true, - require => Service[$::supervisord::service_name], - } - exec { 'supervisorctl_update': - command => "${supervisorctl} update", - refreshonly => true, - require => Service[$::supervisord::service_name], - } + exec { 'supervisorctl_reread': + command => "${supervisorctl} reread", + refreshonly => true, + } + exec { 'supervisorctl_update': + command => "${supervisorctl} update", + refreshonly => true, } }