Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/242860

Change subject: otrs: Ship systemd unit file for OTRS scheduler
......................................................................

otrs: Ship systemd unit file for OTRS scheduler

Versions of OTRS > 3.3.x require an OTRS scheduler to run as a service
under the otrs user. Ship a systemd file to enable that behavior. The
daemon does not have a restart command

Change-Id: I380b5a6a173b61e1551c07d6fae49cf8bf7d6f01
---
M modules/otrs/manifests/init.pp
A modules/otrs/templates/otrs-scheduler.systemd.erb
2 files changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/242860/1

diff --git a/modules/otrs/manifests/init.pp b/modules/otrs/manifests/init.pp
index 7007915..3090701 100644
--- a/modules/otrs/manifests/init.pp
+++ b/modules/otrs/manifests/init.pp
@@ -131,4 +131,16 @@
         ensure => link,
         target => '/opt/otrs/Kernel/Output/HTML/Standard',
     }
+
+    base::service_unit { 'otrs-scheduler':
+        ensure  => present,
+        upstart => false,
+        systemd => true,
+        refresh => true,
+        service_params => {
+            enable     => true,
+            hasstatus  => true,
+            hasrestart => false,
+        }
+    }
 }
diff --git a/modules/otrs/templates/otrs-scheduler.systemd.erb 
b/modules/otrs/templates/otrs-scheduler.systemd.erb
new file mode 100644
index 0000000..ed2fba1
--- /dev/null
+++ b/modules/otrs/templates/otrs-scheduler.systemd.erb
@@ -0,0 +1,16 @@
+# NOTE: This file is managed by Puppet
+# Systemd unit for <%= @title %>
+[Unit]
+Description="<%= @title %> service"
+
+[Service]
+User=otrs
+Group=otrs
+Restart=always
+RestartSec=2s
+TimeoutStopSec=60
+ExecStart=/opt/otrs/bin/otrs.Scheduler.pl -a start
+ExecStop=/opt/otrs/bin/otrs.Scheduler.pl -a stop
+
+[Install]
+WantedBy=multi-user.target

-- 
To view, visit https://gerrit.wikimedia.org/r/242860
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I380b5a6a173b61e1551c07d6fae49cf8bf7d6f01
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to