forked from mtusi2026/mtusi2026lab7
Implement lab 7 transport security and worker containment
This commit is contained in:
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
secret() { tr -d '\r\n' < "/run/secrets/$1"; }
|
||||
endpoint="${S3_ENDPOINT:-http://s3:9000}"
|
||||
RC_HOST_root="${endpoint%%://*}://$(secret s3_root_user):$(secret s3_root_password)@${endpoint#*://}"
|
||||
RC_HOST_api="${endpoint%%://*}://$(secret s3_access_key_id):$(secret s3_secret_access_key)@${endpoint#*://}"
|
||||
RC_HOST_reconciler="${endpoint%%://*}://$(secret s3_reconciler_access_key_id):$(secret s3_reconciler_secret_access_key)@${endpoint#*://}"
|
||||
export RC_HOST_root RC_HOST_api RC_HOST_reconciler
|
||||
rc alias set anon "$endpoint" --anonymous >/dev/null
|
||||
case "${1:-}" in
|
||||
sh|wget) exec "$@" ;;
|
||||
esac
|
||||
exec rc "$@"
|
||||
Reference in New Issue
Block a user