Alexandros Kosiaris has submitted this change and it was merged.
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, 31 insertions(+), 0 deletions(-)
Approvals:
Alexandros Kosiaris: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/otrs/manifests/init.pp b/modules/otrs/manifests/init.pp
index 7007915..3abc343 100644
--- a/modules/otrs/manifests/init.pp
+++ b/modules/otrs/manifests/init.pp
@@ -131,4 +131,19 @@
ensure => link,
target => '/opt/otrs/Kernel/Output/HTML/Standard',
}
+
+ # TODO: Remove the safeguard once we are jessie only
+ if os_version('debian >= jessie') {
+ 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: merged
Gerrit-Change-Id: I380b5a6a173b61e1551c07d6fae49cf8bf7d6f01
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits