Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service file for Linux environments #468

Closed
thhart opened this issue May 1, 2021 · 1 comment
Closed

Service file for Linux environments #468

thhart opened this issue May 1, 2021 · 1 comment
Assignees
Labels
documentation Issues related to docs

Comments

@thhart
Copy link

thhart commented May 1, 2021

This is a code snippet for a possible service file to start reposilite automatically. The file should be saved as reposilite.service into /etc/systemd/system. The User must be changed as wished and must exist of course, using the root user is not recommended. Then it might be activated like this:
systemctl enable reposilite
systemctl start reposilite

Of course you must have root access to the system and systemd must be installed as it is in Debian based Linux.

[Unit]
Description=Reposilite Service
[Service]
User=th
# The configuration file application.properties should be here:

#change this to your workspace
WorkingDirectory=/opt/reposilite

#path to executable.
#executable is a bash script which calls jar file
ExecStart=java -jar reposilite-2.9.21.jar --config=/etc/reposilite/reposilite.cdn

SuccessExitStatus=0
TimeoutStopSec=10
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
@dzikoysk dzikoysk added the documentation Issues related to docs label May 1, 2021
@dzikoysk
Copy link
Owner

dzikoysk commented May 1, 2021

Thanks, I think we can add Systemd section in docs with the example template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to docs
Projects
None yet
Development

No branches or pull requests

2 participants