[IMP] Launch script: help to use another configuration file to launch
multiple instance with different configuration of Gissmo
This commit is contained in:
parent
d043040b91
commit
437bc2cdc3
15
launch.sh
15
launch.sh
@ -15,7 +15,10 @@ POSTGRES_VERSION="9.5"
|
|||||||
GISSMO_DOCKER_NAME="gissmo"
|
GISSMO_DOCKER_NAME="gissmo"
|
||||||
|
|
||||||
## User
|
## User
|
||||||
|
if test -z "$GISSMO_CFG"; then
|
||||||
|
# No Gissmo Launcher configuration file given. Search one.
|
||||||
CONFIG_FILENAME="config"
|
CONFIG_FILENAME="config"
|
||||||
|
# first in XDG directory, otherwise ~/.config one.
|
||||||
if test -z $XDG_CONFIG_HOME; then
|
if test -z $XDG_CONFIG_HOME; then
|
||||||
CONFIG_DEFAULT_DIR="${HOME}/.config/gissmo"
|
CONFIG_DEFAULT_DIR="${HOME}/.config/gissmo"
|
||||||
else
|
else
|
||||||
@ -29,6 +32,14 @@ if ! test -f ${CONFIG_FILE}; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Gissmo Launcher configuration file is given! Check it.
|
||||||
|
CONFIG_FILE=$GISSMO_CFG
|
||||||
|
if ! test -f $CONFIG_FILE; then
|
||||||
|
echo "Configuration file not found: ${CONFIG_FILE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
. ${CONFIG_FILE} || exit 1
|
. ${CONFIG_FILE} || exit 1
|
||||||
|
|
||||||
## Composed
|
## Composed
|
||||||
@ -89,6 +100,10 @@ show_help() {
|
|||||||
echo -e " $PROGRAM stop"
|
echo -e " $PROGRAM stop"
|
||||||
echo -e " $PROGRAM start python manage.py shell"
|
echo -e " $PROGRAM start python manage.py shell"
|
||||||
echo -e " $PROGRAM stop"
|
echo -e " $PROGRAM stop"
|
||||||
|
echo ""
|
||||||
|
echo -e "If GISSMO_CFG used, you can specify another configuration file. Example:"
|
||||||
|
echo ""
|
||||||
|
echo -e " GISSMO_CFG=~/new_config $PROGRAM"
|
||||||
# TODO: Add clean() command to STOP and DELETE Gissmo Docker container
|
# TODO: Add clean() command to STOP and DELETE Gissmo Docker container
|
||||||
# TODO: Add clean_db() command to STOP and DELETE postgreSQL Docker container
|
# TODO: Add clean_db() command to STOP and DELETE postgreSQL Docker container
|
||||||
# TODO: Add clean_all() command that makes clean() and clean_db()
|
# TODO: Add clean_all() command that makes clean() and clean_db()
|
||||||
|
Loading…
Reference in New Issue
Block a user