diff options
author | Philip Champon <pchampon@gmail.com> | 2010-12-08 09:03:55 +0300 |
---|---|---|
committer | Philip Champon <pchampon@gmail.com> | 2010-12-08 09:03:55 +0300 |
commit | ccbf51fdbed9a4e1071e512c71fb1233e556c2f0 (patch) | |
tree | 7966493203fec6ba9e9b8bab03e8719462b4f0e0 /script | |
parent | b94e6ae4a0bbb70b4d525542653590ecf734b02c (diff) |
Issue 676: allow for correct calling of bsd sed
Diffstat (limited to 'script')
-rwxr-xr-x | script/server | 10 |
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. |