2017-09-16 15:48:42 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# enable zammad systemd services
|
|
|
|
#
|
|
|
|
|
2017-10-03 09:27:27 +00:00
|
|
|
ZAMMAD_ENV_DIR="/etc/zammad"
|
|
|
|
SYSTEMD_SERVICE_DIR="/etc/systemd/system"
|
|
|
|
|
2017-09-16 15:48:42 +00:00
|
|
|
if [ "$(whoami)" != 'root' ]; then
|
|
|
|
echo "you need to be root to run this script!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-10-03 09:27:27 +00:00
|
|
|
test -d ${ZAMMAD_ENV_DIR} || mkdir -p ${ZAMMAD_ENV_DIR}
|
|
|
|
|
|
|
|
test -d ${SYSTEMD_SERVICE_DIR} || mkdir -p ${SYSTEMD_SERVICE_DIR}
|
|
|
|
|
|
|
|
cp zammad.env ${ZAMMAD_ENV_DIR}
|
|
|
|
|
|
|
|
cp zammad.service zammad-rails.service zammad-scheduler.service zammad-websocket.service ${SYSTEMD_SERVICE_DIR}
|
2017-09-16 15:48:42 +00:00
|
|
|
|
|
|
|
systemctl daemon-reload
|
|
|
|
|
|
|
|
systemctl enable zammad
|
|
|
|
|
|
|
|
systemctl start zammad
|