-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch updater to systemd system service (#72)
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.
- Loading branch information
1 parent
f16f3de
commit 6c6339f
Showing
4 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
[Unit] | ||
Description=Hubble Enterprise updater | ||
After=mysql.service | ||
Requires=github-enterprise.target | ||
After=github-enterprise.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python3 /opt/autodesk/hubble-enterprise/update-stats.py | ||
WorkingDirectory=/opt/autodesk/hubble-enterprise/ | ||
User=admin | ||
Group=admin | ||
|
||
[Install] | ||
WantedBy=github-enterprise.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
[Unit] | ||
Description=Runs Hubble Enterprise updater periodically | ||
Requires=github-enterprise.target | ||
After=github-enterprise.target | ||
|
||
[Timer] | ||
OnCalendar=7:30 | ||
Persistent=true | ||
Unit=hubble-enterprise.service | ||
|
||
[Install] | ||
WantedBy=default.target | ||
WantedBy=github-enterprise.target |