build files for making podman containers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
318 B

#!/bin/bash
. /usr/local/bin/maint-mode
mode_get
mode_on
if [[ ! -f $1 ]]; then
>&2 echo "Error: could not find file \"$1\""
exit 2
fi
mode=$(nc-occ maintenance:mode | cut -d' ' -f 5)
if [[ $mode != "enabled" ]]; then
nc-occ maintenance:mode --on
fi
db-make
psql -U $DBUSER -d $DBNAME -f $1
mode_off