From 2eb28d46b0d5c2ae5c7dd614db8e7800baeb0756 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Fri, 22 Apr 2016 10:19:37 +0200 Subject: Keep track of created instances in INSTANCES file. This makes it easier to iterate on instances after installation. In particular, the postinst script can easily run migration code on upgrades. Signed-off-by: Cyril Brulebois --- ishtar-prepare-instance | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ishtar-prepare-instance b/ishtar-prepare-instance index 140c38a0e..0bd74d375 100755 --- a/ishtar-prepare-instance +++ b/ishtar-prepare-instance @@ -11,6 +11,7 @@ INSTANCE=${INSTANCE-iggdrasil} PROJECT=${PROJECT-Test} URL=${URL-localhost} DEST=/var/lib/python-django-ishtar +INSTANCES_FILE=$DEST/INSTANCES echo "*** Preparing ishtar (instance: $INSTANCE, project: $PROJECT) under $DEST ***" @@ -179,3 +180,6 @@ ln -sf "$NGINX_AVAILABLE_PATH/ishtar-$INSTANCE.conf" \ echo "*** uwsgi and nginx configured, restart them and you're done ***" printf "\n /etc/init.d/uwsgi restart\n /etc/init.d/nginx restart\n\n Enjoy ishtar!\n" + +# Register instance: +echo "$INSTANCE" >> $INSTANCES_FILE -- cgit v1.2.3