From 815e846684aff1498d8840cfa1d8982f18260260 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Mon, 18 Oct 2010 10:21:41 +0200 Subject: [PATCH] Test provisions. --- pkg/ubuntu/diaspora-setup | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/ubuntu/diaspora-setup b/pkg/ubuntu/diaspora-setup index 4b9207fd3..96284dd9b 100755 --- a/pkg/ubuntu/diaspora-setup +++ b/pkg/ubuntu/diaspora-setup @@ -9,6 +9,7 @@ test "$( perl -e 'print $<')" = "0" || { echo "You need to be root to do this, giving up" exit 2 } +external_hostname="$1" arg_hostname="$1" @@ -46,12 +47,13 @@ fi chmod 777 /var/lib/diaspora/uploads chown -R diaspora /var/log/diaspora -if [ -n "$arg_hostname" ]; then - sed -i "/pod_url:/s/$hostname/$arg_hostname/g" config/app_config.yml && - echo "config/app_config.yml updated." - exit 0 +if [ -n "$external_hostname" ]; then + sed -i "/pod_url:/s/$hostname/$external_hostname/g" \ + config/app_config.yml && echo "config/app_config.yml updated." + exit $? fi + hostname=$( awk '/pod_url:/ { print $2; exit }'