Test provisions.
This commit is contained in:
parent
a99c15d388
commit
815e846684
1 changed files with 6 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ test "$( perl -e 'print $<')" = "0" || {
|
||||||
echo "You need to be root to do this, giving up"
|
echo "You need to be root to do this, giving up"
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
external_hostname="$1"
|
||||||
|
|
||||||
arg_hostname="$1"
|
arg_hostname="$1"
|
||||||
|
|
||||||
|
|
@ -46,12 +47,13 @@ fi
|
||||||
chmod 777 /var/lib/diaspora/uploads
|
chmod 777 /var/lib/diaspora/uploads
|
||||||
chown -R diaspora /var/log/diaspora
|
chown -R diaspora /var/log/diaspora
|
||||||
|
|
||||||
if [ -n "$arg_hostname" ]; then
|
if [ -n "$external_hostname" ]; then
|
||||||
sed -i "/pod_url:/s/$hostname/$arg_hostname/g" config/app_config.yml &&
|
sed -i "/pod_url:/s/$hostname/$external_hostname/g" \
|
||||||
echo "config/app_config.yml updated."
|
config/app_config.yml && echo "config/app_config.yml updated."
|
||||||
exit 0
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
hostname=$( awk '/pod_url:/ { print $2; exit }' <config/app_config.yml)
|
hostname=$( awk '/pod_url:/ { print $2; exit }' <config/app_config.yml)
|
||||||
while : ; do
|
while : ; do
|
||||||
echo "Current hostname is \"$hostname\""
|
echo "Current hostname is \"$hostname\""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue