Systemd unit for zip installation

I could not find official way to integrate zip installation in startup. Found this on internet:

[Unit]
Description=Youtrack
After=network.target

[Install]
WantedBy=default.target

[Service]
Type=forking
RemainAfterExit=yes
User=root
Group=users
SyslogIdentifier=youtrack
WorkingDirectory=/opt/youtrack
PIDFile=/opt/youtrack/logs/youtrack.pid
RestartSec=5
Restart=on-failure

ExecStart=/opt/youtrack/bin/youtrack.sh start
ExecStop=/opt/youtrack/bin/youtrack.sh stop

But it throws following message:

Supervising process 126319 which is not our child. We'll most likely not notice when it exits.

and sure it does not notice.

Is there official way for zip installation and linux startup?

 

0
2 comments

Hello,

Unfortunately, we don't have a documented solution for that. We recommend using JAR or Docker versions in case you want to start YouTrack as a service.

0

Hi, I assume that need to put a "--no-browser" option to the "youtrack.sh start".

ExecStart=/opt/youtrack/bin/youtrack.sh start --no-browser

If you put this UNIT declaration to a file like "/lib/systemd/system/youtrack.service" - this shall allow you to control service by systemctl (systemctl enable youtrack). That works fine on my installation.

[19:42:19]/youtrack#systemctl status youtrack
● youtrack.service - Youtrack
 Loaded: loaded (/usr/lib/systemd/system/youtrack.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-02-21 19:41:49 +11; 31s ago
  Process: 991 ExecStart=/youtrack/bin/youtrack.sh start --no-browser (code=exited, status=0/SUCCESS)
 Main PID: 1383 (java)
 CGroup: /system.slice/youtrack.service
           ├─1367 /youtrack/internal/java/linux-x64/bin/java -Djl.service=You...
           └─1383 /youtrack/internal/java/linux-x64/bin/java -Djl.service=You...

Feb 21 19:41:42 localhost.localdomain youtrack[991]: * Configuring Bundle Hub...
Feb 21 19:41:42 localhost.localdomain youtrack[991]: * Configuring YouTrack
Feb 21 19:41:43 localhost.localdomain youtrack[991]: * Starting Service-Conta...
Feb 21 19:41:43 localhost.localdomain youtrack[991]: * Starting Bundle Backen...
Feb 21 19:41:47 localhost.localdomain youtrack[991]: * Starting Starting Page...
Feb 21 19:41:47 localhost.localdomain youtrack[991]: * JetBrains YouTrack 202...
Feb 21 19:41:49 localhost.localdomain youtrack[991]: * Starting YouTrack Conf...
Feb 21 19:41:49 localhost.localdomain youtrack[991]: YouTrack is running
Feb 21 19:41:49 localhost.localdomain systemd[1]: youtrack.service: Supervis...
Feb 21 19:41:49 localhost.localdomain systemd[1]: Started Youtrack.
Hint: Some lines were ellipsized, use -l to show in full.
0

Please sign in to leave a comment.