-
Notifications
You must be signed in to change notification settings - Fork 47
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
Switch updater to systemd system service #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👍
@@ -72,7 +72,7 @@ The updater may be run in two modes: | |||
|
|||
The updater’s log is accessible as follows: | |||
```sh | |||
journalctl -f --user-unit hubble-enterprise.service | |||
journalctl -fu hubble-enterprise.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is unrelated, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it isn’t. -u
stands for --unit
and refers to system units, while --user-unit
is the equivalent for user units and doesn’t have a corresponding shorthand option.
@@ -2,7 +2,7 @@ all: # nothing to build | |||
|
|||
PKGNAME = hubble-enterprise | |||
INSTALLDIR = $(DESTDIR)/opt/autodesk/$(PKGNAME) | |||
SYSTEMDDIR = $(DESTDIR)/home/admin/.local/share/systemd/user | |||
SYSTEMDDIR = $(DESTDIR)/usr/lib/systemd/system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see a way to move our stuff into a subdirectory here? Would that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that systemd
doesn’t look for unit files in a subdirectory.
This makes the systemd system service a user service. There are two reasons that motivated this change. First, user services require an active session of the specified user. This has the drawback that the updater would not be triggered after reboots if no SSH connection to the GitHub Enterprise appliance was made. Second, user services cannot depend on system services. Because of that, the updater service could not reliably wait for the rest of GitHub Enterprise to start.
4a812d6
to
5d5b79a
Compare
This makes the
systemd
system service a user service. There are two reasons that motivated this change.