Create systemd service unit in /etc/systemd/system/crowd.service:

[Unit]
Description=Crowd
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
User=nobody
Group=nobody

Environment=JAVA_HOME=/opt/jdk-latest
Environment=PATH=/opt/jdk-latest/bin:/usr/sbin:/usr/bin
EnvironmentFile=-/etc/default/crowd

WorkingDirectory=/opt/atlassian/crowd

ExecStart=/bin/sh start_crowd.sh
ExecStop=/bin/sh stop_crowd.sh

[Install]
WantedBy=multi-user.target

Create configuration file /etc/default/crowd:

JAVA_OPTS=""

Enable and start service unit on system start:

systemctl enable crowd.service
systemctl start crowd.service

Ссылки по теме:

  1. Setting Crowd to Run Automatically and Use an Unprivileged System User on UNIX

Comments

comments powered by Disqus