Update utility scripts in /bin
This commit is contained in:
parent
4d10c97224
commit
deac0c4c73
12
bin/ojusomap-gen-env-sh
Executable file
12
bin/ojusomap-gen-env-sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Spit out environment variables from ./environment and
|
||||||
|
# compiles them into a bash script that will export them
|
||||||
|
|
||||||
|
THISDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
|
ENV_FILE=$THISDIR/../environment
|
||||||
|
TARGET=$THISDIR/../environment.sh
|
||||||
|
echo "#!/bin/bash" > $TARGET
|
||||||
|
sudo cat $ENV_FILE\
|
||||||
|
| sed -e '/^#/d;/^$/d;s/ /\\ /g;s/</\\</g;s/>/\\>/g'\
|
||||||
|
| sed -e 's/^/export /g' >> $TARGET
|
||||||
|
chmod +x $TARGET
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Generates a fancy docker-compose.yml based on the template by
|
# Generates a fancy environment varibale file based a template by
|
||||||
# mixing in production secrets.
|
# mixing in production secrets from locally set variables.
|
||||||
#
|
#
|
||||||
# Olivia Mackintosh <livvy@base.nu>
|
# Olivia Mackintosh <livvy@base.nu>
|
||||||
|
|
||||||
@ -24,6 +24,11 @@ if [ -z "$SECRET_KEY" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$WEBLATE_ADMIN_PASSWORD" ]; then
|
||||||
|
echo "Error: Please set \$WEBLATE_ADMIN_PASSWORD"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Make sure only root can access and then
|
# Make sure only root can access and then
|
||||||
# sub in the environment variables.
|
# sub in the environment variables.
|
||||||
sudo chown root:root $TARGET
|
sudo chown root:root $TARGET
|
6
bin/ojusomap-redeploy
Executable file
6
bin/ojusomap-redeploy
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Redeploys the OjusoMap stack
|
||||||
|
THISDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
|
cd $THISDIR/../
|
||||||
|
sudo docker-compose up -d --build map
|
||||||
|
cd $THISDIR
|
Loading…
Reference in New Issue
Block a user