Skip to content

Instantly share code, notes, and snippets.

@olragon
Last active April 24, 2021 09:41
Show Gist options
  • Save olragon/e2f3ececd70b8c513ce6f768b47b6e5f to your computer and use it in GitHub Desktop.
Save olragon/e2f3ececd70b8c513ce6f768b47b6e5f to your computer and use it in GitHub Desktop.
caprover-invoiceninja
#!/bin/sh
for ENV_VAR in $(echo $ENV_LIST | tr "," "\n")
do
if grep -q "^$ENV_VAR=" .env; then
sed -i "s/$ENV_VAR=.*/$ENV_VAR=$(printenv $ENV_VAR)/g" .env
else
echo "$ENV_VAR=$(printenv $ENV_VAR)" >> .env
fi
done
mkdir -p /var/www/app/docker-backup-public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment