-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from thin-edge/feat-s6-overlay-disable-flag
feat(s6-overlay): support enabling/disabling a service via env variables
- Loading branch information
Showing
20 changed files
with
81 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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_C8Y_CONFIGURATION_PLUGIN:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/c8y-configuration-plugin |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_C8Y_FIRMWARE_PLUGIN:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/c8y-firmware-plugin |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_MOSQUITTO:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_TEDGE_AGENT:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/tedge-agent |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_TEDGE_LOG_PLUGIN:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/tedge-log-plugin |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_TEDGE_MAPPER_AWS:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/tedge-mapper aws |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_TEDGE_MAPPER_AZ:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/tedge-mapper az |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_TEDGE_MAPPER_C8Y:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/tedge-mapper c8y |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${SERVICE_TEDGE_MAPPER_COLLECTD:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec /usr/bin/tedge-mapper collectd |
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,3 +1,10 @@ | ||
#!/command/with-contenv sh | ||
if [ "${$ENV_ENABLE_SERVICE:-1}" -eq 0 ]; then | ||
# Disable service and don't start again | ||
# https://github.com/just-containers/s6-overlay/issues/394 | ||
s6-svc -O . | ||
exit 0 | ||
fi | ||
|
||
exec 2>&1 | ||
exec $COMMAND $COMMAND_ARGS |
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
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
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