Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorPhilip Champon <pchampon@gmail.com>2010-12-08 09:03:55 +0300
committerPhilip Champon <pchampon@gmail.com>2010-12-08 09:03:55 +0300
commitccbf51fdbed9a4e1071e512c71fb1233e556c2f0 (patch)
tree7966493203fec6ba9e9b8bab03e8719462b4f0e0 /script
parentb94e6ae4a0bbb70b4d525542653590ecf734b02c (diff)
Issue 676: allow for correct calling of bsd sed
Diffstat (limited to 'script')
-rwxr-xr-xscript/server10
1 files changed, 9 insertions, 1 deletions
diff --git a/script/server b/script/server
index 0e070ed56..cf15ad16a 100755
--- a/script/server
+++ b/script/server
@@ -65,7 +65,15 @@ function redis_config
fi
cp $redis_conf config/redis.conf
- sed -i '/^[^#]*daemonize/s/yes/no/' config/redis.conf
+ case $OS in
+ ## bsd sed doesn't seem to handle empty in-place edits correctly
+ *[Bb][Ss][Dd]*|Darwin)
+ sed -i '' '/^[^#]*daemonize/s/yes/no/' config/redis.conf
+ ;;
+ *)
+ sed -i '/^[^#]*daemonize/s/yes/no/' config/redis.conf
+ ;;
+ esac
}
# Scan for -p, find out what port thin is about to use.