mirror of
https://github.com/jwetzell/docker-guacamole.git
synced 2026-08-21 15:09:12 +00:00
test removing postgres extension
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
until pg_isready; do
|
||||
echo "Waiting for postgres to come up..."
|
||||
sleep 1
|
||||
done
|
||||
# until pg_isready; do
|
||||
# echo "Waiting for postgres to come up..."
|
||||
# sleep 1
|
||||
# done
|
||||
|
||||
# Create database if it does not exist
|
||||
psql -U postgres -lqt | cut -d \| -f 1 | grep -qw $POSTGRES_DB
|
||||
if [ $? -ne 0 ]; then
|
||||
createuser -U postgres $POSTGRES_USER
|
||||
createdb -U postgres -O $POSTGRES_USER $POSTGRES_DB
|
||||
cat /app/guacamole/schema/*.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
|
||||
echo "$GUAC_VER" > /config/.database-version
|
||||
# psql -U postgres -lqt | cut -d \| -f 1 | grep -qw $POSTGRES_DB
|
||||
# if [ $? -ne 0 ]; then
|
||||
# createuser -U postgres $POSTGRES_USER
|
||||
# createdb -U postgres -O $POSTGRES_USER $POSTGRES_DB
|
||||
# cat /app/guacamole/schema/*.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
|
||||
# echo "$GUAC_VER" > /config/.database-version
|
||||
|
||||
/etc/cont-init.d/30-defaults.sh
|
||||
/etc/cont-init.d/50-extensions
|
||||
else
|
||||
if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
|
||||
cat /app/guacamole/schema/upgrade/upgrade-pre-$GUAC_VER.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
|
||||
echo "$GUAC_VER" > /config/.database-version
|
||||
# /etc/cont-init.d/30-defaults.sh
|
||||
# /etc/cont-init.d/50-extensions
|
||||
# else
|
||||
# if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
|
||||
# cat /app/guacamole/schema/upgrade/upgrade-pre-$GUAC_VER.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
|
||||
# echo "$GUAC_VER" > /config/.database-version
|
||||
|
||||
/etc/cont-init.d/30-defaults.sh
|
||||
/etc/cont-init.d/50-extensions
|
||||
fi
|
||||
fi
|
||||
# /etc/cont-init.d/30-defaults.sh
|
||||
# /etc/cont-init.d/50-extensions
|
||||
# fi
|
||||
# fi
|
||||
|
||||
echo "Starting guacamole client..."
|
||||
s6-setuidgid root catalina.sh run
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
echo "Starting postgres..."
|
||||
s6-setuidgid postgres postgres
|
||||
Reference in New Issue
Block a user