diff options
author | Alec Leamas <leamas.alec@gmail.com> | 2010-10-20 10:54:56 +0400 |
---|---|---|
committer | Alec Leamas <leamas.alec@gmail.com> | 2010-10-20 10:54:56 +0400 |
commit | fb70dc8c99a1bc7a8a3595b9cdd9d53d1ff81bab (patch) | |
tree | 8da6df18a275dc9ce0de0e52f9131ef06283ee8a /pkg | |
parent | 53fef63a9a555a083ac9237f872a70e2b2a7115b (diff) | |
parent | d3d01821644fcc0a1306998b2f3deda857d623b3 (diff) |
Merge remote branch 'upstream/master'
Conflicts:
pkg/ubuntu/diaspora-setup
Diffstat (limited to 'pkg')
-rwxr-xr-x | pkg/fedora/diaspora-setup | 7 | ||||
-rwxr-xr-x | pkg/ubuntu/diaspora-setup | 15 |
2 files changed, 11 insertions, 11 deletions
diff --git a/pkg/fedora/diaspora-setup b/pkg/fedora/diaspora-setup index 3e8ff3bb4..01f0d3cdc 100755 --- a/pkg/fedora/diaspora-setup +++ b/pkg/fedora/diaspora-setup @@ -45,13 +45,14 @@ fi chmod 777 /var/lib/diaspora/uploads chown -R diaspora /var/log/diaspora +hostname=$( awk '/pod_url:/ { print $2; exit }' <config/app_config.yml) + if [ -n "$arg_hostname" ]; then - sed -i "/pod_url:/s/$hostname/$arg_hostname/g" config/app_config.yml && + sed -i "/pod_url:/s|$hostname|$arg_hostname|g" config/app_config.yml && echo "config/app_config.yml updated." exit 0 fi -hostname=$( awk '/pod_url:/ { print $2; exit }' <config/app_config.yml) while : ; do echo "Current hostname is \"$hostname\"" echo -n "Enter new hostname [$hostname] :" @@ -59,7 +60,7 @@ while : ; do echo -n "Use hostname \"$new_hostname\" as pod_url (Yes/No) [Yes]? :" read yesno garbage test "${yesno:0:1}" = 'y' -o "${yesno:0:1}" = 'Y' -o -z "$yesno" && { - sed -i "/pod_url:/s/$hostname/$new_hostname/g" config/app_config.yml && + sed -i "/pod_url:/s|$hostname|$new_hostname|g" config/app_config.yml && echo "config/app_config.yml updated." break } diff --git a/pkg/ubuntu/diaspora-setup b/pkg/ubuntu/diaspora-setup index 20d0207f0..305527d28 100755 --- a/pkg/ubuntu/diaspora-setup +++ b/pkg/ubuntu/diaspora-setup @@ -9,7 +9,6 @@ test "$( perl -e 'print $<')" = "0" || { echo "You need to be root to do this, giving up" exit 2 } -external_hostname="$1" arg_hostname="$1" @@ -49,14 +48,14 @@ fi chmod 777 /var/lib/diaspora/uploads chown -R diaspora /var/log/diaspora -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) +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 +fi -hostname=$( awk '/pod_url:/ { print $2; exit }' <config/app_config.yml) while : ; do echo "Current hostname is \"$hostname\"" echo -n "Enter new hostname [$hostname] :" @@ -64,7 +63,7 @@ while : ; do echo -n "Use hostname \"$new_hostname\" as pod_url (Yes/No) [Yes]? :" read yesno garbage test "${yesno:0:1}" = 'y' -o "${yesno:0:1}" = 'Y' -o -z "$yesno" && { - sed -i "/pod_url:/s/$hostname/$new_hostname/g" config/app_config.yml && + sed -i "/pod_url:/s|$hostname|$new_hostname|g" config/app_config.yml && echo "config/app_config.yml updated." break } |