From ccbf51fdbed9a4e1071e512c71fb1233e556c2f0 Mon Sep 17 00:00:00 2001 From: Philip Champon Date: Wed, 8 Dec 2010 01:03:55 -0500 Subject: [PATCH] Issue 676: allow for correct calling of bsd sed --- script/server | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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.