Skip to content

Instantly share code, notes, and snippets.

@johnrc
Created June 25, 2016 02:44
Show Gist options
  • Save johnrc/39ead83c4e4b62aa2858f36d6ef17a03 to your computer and use it in GitHub Desktop.
Save johnrc/39ead83c4e4b62aa2858f36d6ef17a03 to your computer and use it in GitHub Desktop.
Nexus unit file for systemd (as opposed to upstart)
[Unit]
Description=Sonatype Nexus
After=centrifydc.service
Requires=centrifydc.service
[Service]
User=user
Group=group
Type=forking
PIDFile=/path/to/nexus-2.11.4-01-bundle/nexus-2.11.4-01/bin/jsw/linux-x86-64/nexus.pid
TimeoutStartSec=0
ExecStart=/path/to/nexus-2.11.4-01-bundle/nexus-2.11.4-01/bin/nexus start
ExecStop=/path/to/nexus-2.11.4-01-bundle/nexus-2.11.4-01/bin/nexus stop
ExecReload=/path/to/nexus-2.11.4-01-bundle/nexus-2.11.4-01/bin/nexus restart
RestartSec=20
[Install]
Alias=nexus
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment