This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a unit file to manage helios-agent service (#1265)
* Add a unit file to manage helios-agent service This sets up helios-agent to be configured as a daemon and managed via systemd Change unit file install path Add comment to wrapper script Add `After` directive to unit file * Add unit file for helios-master
- Loading branch information
Showing
5 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# This wrapper script allows initialization of | ||
# environment variables since systemd's Environment and | ||
# EnvironmentFile directives don't support running | ||
# arbitrary commands. | ||
|
||
DEFAULTFILE=/etc/default/helios-agent | ||
|
||
[ -f $DEFAULTFILE ] && . $DEFAULTFILE | ||
|
||
exec /usr/bin/helios-agent ${HELIOS_AGENT_OPTS} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=Helios agent daemon | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
Restart=always | ||
ExecStart=/usr/bin/helios-agent-wrapper | ||
User=helios | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# This wrapper script allows initialization of | ||
# environment variables since systemd's Environment and | ||
# EnvironmentFile directives don't support running | ||
# arbitrary commands. | ||
|
||
DEFAULTFILE=/etc/default/helios-master | ||
|
||
[ -f $DEFAULTFILE ] && . $DEFAULTFILE | ||
|
||
exec /usr/bin/helios-master ${HELIOS_MASTER_OPTS} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=Helios master daemon | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
Restart=always | ||
ExecStart=/usr/bin/helios-master-wrapper | ||
User=helios | ||
|