2020-03-03 09:15:47 +01:00
|
|
|
#!/bin/sh
|
2020-03-03 15:14:14 +01:00
|
|
|
if [ $1 = "secrets" ]
|
|
|
|
then
|
2020-03-04 11:09:53 +01:00
|
|
|
./sops --config ./config "${@:2}"
|
2020-03-03 15:14:14 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2020-03-03 09:15:47 +01:00
|
|
|
if test -f "./config/$SECRETS_FILE"
|
|
|
|
then
|
2020-03-03 15:14:14 +01:00
|
|
|
./sops --config ./config exec-env "./config/$SECRETS_FILE" "$*"
|
2020-03-03 09:15:47 +01:00
|
|
|
else
|
|
|
|
$@
|
|
|
|
fi
|