diff options
Diffstat (limited to 'modules.d')
-rwxr-xr-x | modules.d/slx-extra-script/hooks/s3-extra-script.sh | 10 | ||||
-rwxr-xr-x | modules.d/slx-extra-script/module-setup.sh | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/modules.d/slx-extra-script/hooks/s3-extra-script.sh b/modules.d/slx-extra-script/hooks/s3-extra-script.sh new file mode 100755 index 00000000..3a8d4ff4 --- /dev/null +++ b/modules.d/slx-extra-script/hooks/s3-extra-script.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# -*- coding: utf-8 -*- +# region imports +. /etc/openslx +# endregion + +[ -z "$SLX_EXTRA_SCRIPT_URL" ] && exit 0 +slx-tools download_retry --slx-time 20 -sS "$SLX_EXTRA_SCRIPT_URL" > /tmp/extra-init || exit 1 +chmod +x /tmp/extra-init +exec /tmp/extra-init diff --git a/modules.d/slx-extra-script/module-setup.sh b/modules.d/slx-extra-script/module-setup.sh new file mode 100755 index 00000000..02f61391 --- /dev/null +++ b/modules.d/slx-extra-script/module-setup.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +check() { + return 255 +} +depends() { + echo conf-tgz +} +install() { + slx_service "s3-extra-script" "Execute extra script from URL" \ + --wafter "s3-fetch-config.service" \ + --before "s3-dnbd3root.service" +} |