Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/284100
Change subject: gitblit: add systemd unit, if jessie use it ...................................................................... gitblit: add systemd unit, if jessie use it Bug:T123718 Change-Id: I1e1bf8c25476a77ebdaa1cbc82061a4c880adf3e --- A modules/gitblit/files/gitblit.service M modules/gitblit/manifests/init.pp 2 files changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/284100/1 diff --git a/modules/gitblit/files/gitblit.service b/modules/gitblit/files/gitblit.service new file mode 100644 index 0000000..6af6ea9 --- /dev/null +++ b/modules/gitblit/files/gitblit.service @@ -0,0 +1,15 @@ +[Unit] +Description=Gitblit managing, viewing, and serving Git repositories. +After=network.target + +[Service] +User=gitblit +Group=gitblit +Environment="ARGS=-server -Xmx8g -Djava.awt.headless=true -jar" +EnvironmentFile=-/etc/sysconfig/gitblit +WorkingDirectory=/opt/gitblit +ExecStart=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data +ExecStop=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data --stop + +[Install] +WantedBy=multi-user.target diff --git a/modules/gitblit/manifests/init.pp b/modules/gitblit/manifests/init.pp index 78e2a2e..673630c 100644 --- a/modules/gitblit/manifests/init.pp +++ b/modules/gitblit/manifests/init.pp @@ -51,9 +51,23 @@ source => 'puppet:///modules/gitblit/gitblit.conf', } + if os_version('debian >= jessie') { + + $gitblit_provider='systemd' + + file { '/etc/systemd/system/gitblit.service': + owner => 'root', + group => 'root', + mode => '0555', + source => 'puppet:///modules/gitblit/gitblit.service', + } + } else { + $gitblit_provider='upstart' + } + service { 'gitblit': ensure => running, - provider => 'upstart', + provider => $gitblit_provider, subscribe => File['/var/lib/gitblit/data/gitblit.properties'], require => File['/etc/init/gitblit.conf'], } -- To view, visit https://gerrit.wikimedia.org/r/284100 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e1bf8c25476a77ebdaa1cbc82061a4c880adf3e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn <dz...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits