Skip to content

Instantly share code, notes, and snippets.

@johnrc
Forked from esamson/.gitignore
Last active June 6, 2016 16:41
Show Gist options
  • Save johnrc/dce9993f6d52413a5c015430e13c0b38 to your computer and use it in GitHub Desktop.
Save johnrc/dce9993f6d52413a5c015430e13c0b38 to your computer and use it in GitHub Desktop.
systemd service file for sonatype nexus. Put this in `$HOME/.config/systemd/user/nexus.service`. Launch with `systemctl --user start nexus`.
default.target.wants/
nexus
JAVA_HOME=/home/esamson/.local/opt/jdk
PATH=/home/esamson/.local/opt/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
[Unit]
Description=Sonatype Nexus
After=network.target
[Service]
Type=forking
EnvironmentFile=-/home/esamson/.config/systemd/user/nexus.env
PIDFile=/home/esamson/.local/opt/nexus/bin/jsw/linux-x86-64/nexus.pid
ExecStart=/home/esamson/.local/opt/nexus/bin/nexus start
ExecReload=/home/esamson/.local/opt/nexus/bin/nexus restart
ExecStop=/home/esamson/.local/opt/nexus/bin/nexus stop
[Install]
Alias=nexus
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment