Skip to content
This repository

Fixed installation script for the chkconfig check, fixed init.d template... #453

Open
wants to merge 1 commit into from

2 participants

Anthony Scalisi Josh Sherman
Anthony Scalisi

The current state doesnt allow a clean installation of redis on an ubuntu box.

As fixed, it's a smooth process.

Tested on Ubuntu 10.04.

Anthony Scalisi

Any feedback?

Josh Sherman

Confirmed working on 10.04 LTS and 12.04 LTS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 12, 2012
Anthony Scalisi scalp42 Fixed installation script for the chkconfig check, fixed init.d templ…
…ate.
46aa679
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 utils/install_server.sh
8 utils/install_server.sh
@@ -146,12 +146,12 @@ REDIS_CHKCONFIG_INFO=\
146 146 # Description: Redis daemon\n
147 147 ### END INIT INFO\n\n"
148 148
149   -if [[ ! `which chkconfig` ]] ; then
  149 +if [ ! `which chkconfig` ] ; then
150 150 #combine the header and the template (which is actually a static footer)
151   - echo -e $REDIS_INIT_HEADER > $TMP_FILE && cat $INIT_TPL_FILE >> $TMP_FILE || die "Could not write init script to $TMP_FILE"
  151 + echo -n $REDIS_INIT_HEADER > $TMP_FILE && cat $INIT_TPL_FILE >> $TMP_FILE || die "Could not write init script to $TMP_FILE"
152 152 else
153 153 #if we're a box with chkconfig on it we want to include info for chkconfig
154   - echo -e $REDIS_INIT_HEADER $REDIS_CHKCONFIG_INFO > $TMP_FILE && cat $INIT_TPL_FILE >> $TMP_FILE || die "Could not write init script to $TMP_FILE"
  154 + echo -n $REDIS_INIT_HEADER $REDIS_CHKCONFIG_INFO > $TMP_FILE && cat $INIT_TPL_FILE >> $TMP_FILE || die "Could not write init script to $TMP_FILE"
155 155 fi
156 156
157 157 #copy to /etc/init.d
@@ -160,7 +160,7 @@ echo "Copied $TMP_FILE => $INIT_SCRIPT_DEST"
160 160
161 161 #Install the service
162 162 echo "Installing service..."
163   -if [[ ! `which chkconfig` ]] ; then
  163 +if [ ! `which chkconfig` ] ; then
164 164 #if we're not a chkconfig box assume we're able to use update-rc.d
165 165 update-rc.d redis_$REDIS_PORT defaults && echo "Success!"
166 166 else

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.