--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: sphinxsearch: reorganizing init script, fixing daemon to be run under non-root account on reload
- From: Roman Ovchinnikov <coolthecold@gmail.com>
- Date: Wed, 18 Jan 2012 16:07:38 +0400
- Message-id: <20120118120738.1664.9233.reportbug@builder-squeeze-amd64.local>
Package: sphinxsearch
Version: 2.0.1-2
Severity: minor
Current init script consists of repeating parts and have error with
reload action - it misses "--chuid sphinxsearch" option to
start-stop-daemon.
I've reorganized script to make it call functions for start/stop
actions. Also, I've changed exit code if template was not found, as
init script should exit with 0 status only on successfull start.
Patch is included.
-- System Information:
Debian Release: 6.0.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-openvz-amd64 (SMP w/24 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- sphinxsearch-2.0.3/debian/init.d 2011-12-01 21:41:08.000000000 +0400
+++ /home/coolcold/sphinxsearch 2012-01-18 16:01:56.320144034 +0400
@@ -82,7 +82,7 @@
return 0
}
-force_stop() {
+do_force_stop() {
# Forcefully kill the process
[ ! -f "$PIDFILE" ] && return
if running ; then
@@ -101,21 +101,27 @@
rm -f $PIDFILE
return 0
}
-
-case "$1" in
- start)
- echo -n "Starting $DESC: "
-
+do_start() {
# Check if we have the configuration file
if [ ! -f /etc/sphinxsearch/sphinx.conf ]; then
echo "\n"
echo "Please create an /etc/sphinxsearch/sphinx.conf configuration file."
echo "A template is provided as /etc/sphinxsearch/sphinx.conf.sample."
- exit 0
+ exit 1
fi
start-stop-daemon --start --pidfile $PIDFILE --chuid sphinxsearch --exec ${DAEMON}
- [ -n "$STARTDELAY" ] && sleep $STARTDELAY
+}
+do_stop() {
+ start-stop-daemon --stop --quiet --oknodo --user sphinxsearch --pidfile $PIDFILE \
+ --exec $DAEMON
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ do_start
+ [ -n "$STARTDELAY" ] && sleep $STARTDELAY
if running ; then
echo "$NAME."
@@ -125,13 +131,12 @@
;;
stop)
echo -n "Stopping $DESC: "
- start-stop-daemon --stop --quiet --oknodo --user sphinxsearch --pidfile $PIDFILE \
- --exec $DAEMON
+ do_stop
echo "$NAME."
;;
force-stop)
echo -n "Forcefully stopping $DESC: "
- force_stop
+ do_force_stop
if ! running ; then
echo "$NAME."
else
@@ -140,10 +145,9 @@
;;
restart|reload|force-reload)
echo -n "Restarting $DESC: "
- start-stop-daemon --stop --quiet --user sphinxsearch --oknodo --pidfile $PIDFILE \
- --exec $DAEMON
+ do_stop
[ -n "$DODTIME" ] && sleep $DODTIME
- start-stop-daemon --start --exec ${DAEMON}
+ do_start
echo "$NAME."
;;
--- End Message ---
--- Begin Message ---
Source: sphinxsearch
Source-Version: 2.2.11-5
Done: Andrej Shadura <andrewsh@debian.org>
We believe that the bug you reported is fixed in the latest version of
sphinxsearch, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 656326@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andrej Shadura <andrewsh@debian.org> (supplier of updated sphinxsearch package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 03 Dec 2021 10:41:03 +0100
Source: sphinxsearch
Architecture: source
Version: 2.2.11-5
Distribution: unstable
Urgency: medium
Maintainer: Andrej Shadura <andrewsh@debian.org>
Changed-By: Andrej Shadura <andrewsh@debian.org>
Closes: 656326 772370 861262 871944 939763
Changes:
sphinxsearch (2.2.11-5) unstable; urgency=medium
.
* New maintainer (Closes: #939763).
* Add gbp.conf.
* Convert copyright file to machine-readable format.
* Add exclusions for current and future releases.
* Simplify the init script (Closes: #861262, #772370, #656326).
* Fix the crontab user (Closes: #656326).
* Update the sample/minimal conf files to match installation paths.
* Don't install an extra copy of the configuration sample.
* debian/copyright: use spaces rather than tabs to start continuation lines.
* Set Standards-Version: 4.6.0.
* Drop B-D on dh-autoreconf, autotools-dev and adduser.
* Enable re2 support.
* Move the example.sql to /usr/share/doc (Closes: #871944).
Checksums-Sha1:
8bac5c0abc5e0fccd053f8951695c1821d5cada3 1453 sphinxsearch_2.2.11-5.dsc
2f581af4f6e7fd051e4d31a580225d35801126e4 16816 sphinxsearch_2.2.11-5.debian.tar.xz
Checksums-Sha256:
e02f2339e87ff419ed86ac676ecc178b0c8bbde78fc83b6fe50df9213d331bfa 1453 sphinxsearch_2.2.11-5.dsc
560d216482ef2f96d2f1570abbe112e4984758dc28008155b9b703ef860c7eed 16816 sphinxsearch_2.2.11-5.debian.tar.xz
Files:
d4b1ac04a5e83c3670219106706feb39 1453 misc optional sphinxsearch_2.2.11-5.dsc
870bc8f3c0b711f7276265e7c336c99c 16816 misc optional sphinxsearch_2.2.11-5.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQSD3NF/RLIsyDZW7aHoRGtKyMdyYQUCYanpSQAKCRDoRGtKyMdy
YfyXAP9cLvrBstyzrkWFSGqSuitY5DfxKvQRCd4Lt2LPOhMQnAEA4h5eAJ56U+vr
klFVv/KBHCsbPweDegj2TJ6YIS+Fiwg=
=QxDx
-----END PGP SIGNATURE-----
--- End Message ---