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

Updating systemd unit configuration #7

Merged
merged 4 commits into from Nov 3, 2017
Merged

Conversation

shjin
Copy link
Contributor

@shjin shjin commented Oct 21, 2017

  • Updated systemd unit file to have correct file name based on systemd template documentation.
  • Included instruction on how to setup systemd service and monitor it.

Copy link
Owner

@LXXero LXXero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about dropping screen entirely? I feel like it's only even here for legacy reasons - we can still see all of it's output via "journalctl" anyway - so there's not much of a reason for using it anymore, just legacy purposes really, as we'd been using it that way for a while.

; Service Installation
; --------------------
; 1. Save your alarmserver scripts at /home/{user}/alarmserver
; 2. Save this file at /usr/lib/systemd/system/alarmserver@.service
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we be advising this location, or rather /etc/systemd/system? I believe the /usr/lib/systemd location is primarily used for packages as opposed to locally/manually installed files like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about /usr/lib/alarmserver instead? I found many other software installed are there and they create needed symlink or hardlink to /usr/bin/ if then want the executable available for user to execute anywhere.

/etc is where people store system configuration files but not executables or python scripts.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm referring specifically to the .service file location - there's really only 2 valid locations for systemd - and that's /usr/lib/systemd/system (which is typically where RPM/Debs drop files) and /etc/systemd/system which is typically used for manually installed files (similar to /usr vs /usr/local, despite the slightly different context of /usr/lib vs /etc)

@shjin
Copy link
Contributor Author

shjin commented Oct 21, 2017

I think it makes sense to remove "screen". I was thinking some people would like to see the log interactively without going into journal or log file, but "screen" comes with the cost. For example, it is hard to see the error when alarmserver fails to start because screen session goes away and the exception message is lost.

@shjin
Copy link
Contributor Author

shjin commented Oct 21, 2017

I have updated this pull request with new alarmserver.service. Now "screen" is removed and updated instructions accordingly for new installation location.

@LXXero LXXero merged commit 94cdb72 into LXXero:master Nov 3, 2017
rtorchia pushed a commit to rtorchia/DSCAlarm that referenced this pull request May 11, 2020
Updating systemd unit configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants