From d7eefa1d69bf6abb8c886b61ed8aa64b6f0aa164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Tue, 3 Oct 2017 12:50:29 +0200 Subject: [PATCH] fixed systemd services --- script/systemd/zammad-rails.service | 6 +++--- script/systemd/zammad-scheduler.service | 6 +++--- script/systemd/zammad-websocket.service | 6 +++--- script/systemd/zammad.env | 3 --- script/systemd/zammad.service | 4 ++-- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/script/systemd/zammad-rails.service b/script/systemd/zammad-rails.service index a92ad7a51..4e4b1aedd 100644 --- a/script/systemd/zammad-rails.service +++ b/script/systemd/zammad-rails.service @@ -7,11 +7,11 @@ Requires=zammad.service [Service] EnvironmentFile=/etc/zammad/zammad.env -User=${ZAMMAD_USER} -Group=${ZAMMAD_GROUP} +User=zammad +Group=zammad Restart=always -WorkingDirectory=${ZAMMAD_WORKING_DIRECTORY} +WorkingDirectory=/opt/zammad ExecStart=/bin/bash -l -c "${BUNDLE_BINARY} exec script/rails server -b ${ZAMMAD_BIND_IP} -p ${ZAMMAD_RAILS_PORT}" diff --git a/script/systemd/zammad-scheduler.service b/script/systemd/zammad-scheduler.service index ec5653727..8b88b1295 100644 --- a/script/systemd/zammad-scheduler.service +++ b/script/systemd/zammad-scheduler.service @@ -8,11 +8,11 @@ Requires=zammad.service [Service] Type=forking EnvironmentFile=/etc/zammad/zammad.env -User=${ZAMMAD_USER} -Group=${ZAMMAD_GROUP} +User=zammad +Group=zammad Restart=always -WorkingDirectory=${ZAMMAD_WORKING_DIRECTORY} +WorkingDirectory=/opt/zammad ExecStart=/bin/bash -l -c "${BUNDLE_BINARY} exec script/scheduler.rb start" diff --git a/script/systemd/zammad-websocket.service b/script/systemd/zammad-websocket.service index 8c1450e66..9a56d0124 100644 --- a/script/systemd/zammad-websocket.service +++ b/script/systemd/zammad-websocket.service @@ -7,11 +7,11 @@ Requires=zammad.service [Service] EnvironmentFile=/etc/zammad/zammad.env -User=${ZAMMAD_USER} -Group=${ZAMMAD_GROUP} +User=zammad +Group=zammad Restart=always -WorkingDirectory=${ZAMMAD_WORKING_DIRECTORY} +WorkingDirectory=/opt/zammad ExecStart=/bin/bash -l -c "${BUNDLE_BINARY} exec script/websocket-server.rb -b ${ZAMMAD_BIND_IP} -p ${ZAMMAD_WEBSOCKET_PORT} start" diff --git a/script/systemd/zammad.env b/script/systemd/zammad.env index 3b1f84599..7e4e42e20 100644 --- a/script/systemd/zammad.env +++ b/script/systemd/zammad.env @@ -1,8 +1,5 @@ BUNDLE_BINARY=bundle RAILS_ENV=production ZAMMAD_BIND_IP=127.0.0.1 -ZAMMAD_GROUP=zammad ZAMMAD_RAILS_PORT=3000 -ZAMMAD_USER=zammad ZAMMAD_WEBSOCKET_PORT=6042 -ZAMMAD_WORKING_DIRECTORY=/opt/zammad diff --git a/script/systemd/zammad.service b/script/systemd/zammad.service index 6fb380e1f..d27f3e35f 100644 --- a/script/systemd/zammad.service +++ b/script/systemd/zammad.service @@ -9,8 +9,8 @@ Wants=zammad-websocket.service [Service] EnvironmentFile=/etc/zammad/zammad.env -User=${ZAMMAD_USER} -Group=${ZAMMAD_GROUP} +User=zammad +Group=zammad Restart=always ExecStart=/bin/sleep infinity