install-zammad-systemd-services.sh 562 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. #
  3. # enable zammad systemd services
  4. #
  5. ZAMMAD_ENV_DIR="/etc/zammad"
  6. SYSTEMD_SERVICE_DIR="/etc/systemd/system"
  7. if [ "$(whoami)" != 'root' ]; then
  8. echo "you need to be root to run this script!"
  9. exit 1
  10. fi
  11. test -d ${ZAMMAD_ENV_DIR} || mkdir -p ${ZAMMAD_ENV_DIR}
  12. test -d ${SYSTEMD_SERVICE_DIR} || mkdir -p ${SYSTEMD_SERVICE_DIR}
  13. cp zammad.env ${ZAMMAD_ENV_DIR}
  14. cp zammad.service zammad-rails.service zammad-scheduler.service zammad-websocket.service ${SYSTEMD_SERVICE_DIR}
  15. systemctl daemon-reload
  16. systemctl enable zammad
  17. systemctl start zammad