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

Init.d script #33

Open
NovaGL opened this issue Oct 22, 2016 · 0 comments
Open

Init.d script #33

NovaGL opened this issue Oct 22, 2016 · 0 comments

Comments

@NovaGL
Copy link

NovaGL commented Oct 22, 2016

This is working for me but might need some refinements as I am not a unix expert.

Change user and folder depending on your usage. Assumes you have created a user called harmony and that the folder is accessible by that user

You can easily create this user with useradd --system harmony or choose a different name

File goes in /lib/systemd/system/harmony-api.service

[Unit]
Description=Harmony API
After=syslog.target network-online.target

[Service]
Type=simple
User=harmony
ExecStart=/harmony-api/script/server
Restart=on-failure
RestartSec=10
KillMode=process
PIDFile=/var/run/harmony-api.pid
StandardOutput=inherit 
StandardError=inherit 
SyslogIdentifier=harmony-api

[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant