iamshah99 / sphinxsearch

Automatically exported from code.google.com/p/sphinxsearch
GNU General Public License v2.0
1 stars 0 forks source link

Debian package init-script from sphinxsearch.com doesn't -recreate piddir #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

  1. Install sphinxsearch on Debian
  2. Make start at boot, add test index, enable in /etc/default/sphinxsearch
  3. Reboot

What is the expected output? What do you see instead?

  using config file '/etc/sphinxsearch/sphinx.conf'...
  FATAL: failed to create pid file '/var/run/sphinxsearch/searchd.pid': No such file or directory
  ERROR.

What version of the product are you using? On what operating system?

  Those Debian builds on sphinxsearch.com (sphinxsearch_2.1.3-release-1~wheezy_amd64.deb in particular). Packages from Debian repositories are OK.

Please provide any additional information below.

  Here's the part of init-script from repository package that site package misses (comes after "set -e"):

# Make sure the pidfile directory exists with correct permissions
piddir=`dirname "$PIDFILE"`
if [ ! -d "$piddir" ]; then
    mkdir -p "$piddir"
    chown -R sphinxsearch "$piddir"
    chgrp -R sphinxsearch "$piddir"
fi

Note that /run (/var/run is its symlink) is mounted as tmpfs, so it's not 
persistent and init-script should check the path for $PIDFILE.

Original issue reported on code.google.com by i...@saaj.me on 20 Nov 2013 at 3:34