Test provisions.

This commit is contained in:
Alec Leamas 2010-10-18 10:21:41 +02:00
parent a99c15d388
commit 815e846684

View file

@ -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 }' <config/app_config.yml)
while : ; do
echo "Current hostname is \"$hostname\""