Re: daemon patches
"Casey T. Deccio" <[email protected]>
| Newsgroups | gmane.network.nocat |
|---|---|
| Organization | Sandia National Laboratories |
| Message-ID | <[email protected]> |
On Wed, 2005-03-16 at 17:18 -0700, Casey T. Deccio wrote:
> Please let me know if the file attachment doesn't show up :)
This will be a little ugly, but I'm placing the patch inline...
diff -Naur NoCatSplash-0.93pre2/rc.nocat NoCatSplash-test/rc.nocat
--- NoCatSplash-0.93pre2/rc.nocat 2005-02-27 08:56:05.000000000
-0800
+++ NoCatSplash-test/rc.nocat 2005-03-16 16:02:11.601099880 -0800
@@ -9,18 +9,18 @@
case "$1" in
start)
echo -n "Starting NoCat splash server:"
- echo -n " splashd" ; start-stop-daemon --start --quiet
--pidfile /var/run/splashd.pid --exec /usr/local/sbin/splashd
+ echo -n " splashd" ; start-stop-daemon --start --quiet
--pidfile /usr/local/var/run/splashd.pid --exec /usr/local/sbin/splashd
echo "."
;;
stop)
echo -n "Stopping NoCat splash server:"
- echo -n " splashd" ; start-stop-daemon --stop --quiet --oknodo
--pidfile /var/run/splashd.pid --exec /usr/local/sbin/splashd
+ echo -n " splashd" ; start-stop-daemon --stop --quiet --oknodo
--pidfile /usr/local/var/run/splashd.pid --exec /usr/local/sbin/splashd
echo "."
;;
reload)
echo -n "Reloading NoCat splash server:"
echo -n " splashd"
- start-stop-daemon --stop --quiet --oknodo
--pidfile /var/run/splashd.pid --signal 1
+ start-stop-daemon --stop --quiet --oknodo
--pidfile /usr/local/var/run/splashd.pid --signal 1
echo "."
;;
force-reload)
@@ -29,8 +29,8 @@
restart)
echo -n "Restarting NoCat splash server:"
echo -n " splashd"
- start-stop-daemon --stop --quiet --oknodo
--pidfile /var/run/splashd.pid
- start-stop-daemon --start --quiet --pidfile /var/run/splashd.pid
--exec /usr/local/sbin/splashd
+ start-stop-daemon --stop --quiet --oknodo
--pidfile /usr/local/var/run/splashd.pid
+ start-stop-daemon --start --quiet
--pidfile /usr/local/var/run/splashd.pid --exec /usr/local/sbin/splashd
echo "."
;;
*)
diff -Naur NoCatSplash-0.93pre2/src/splashd.c
NoCatSplash-test/src/splashd.c
--- NoCatSplash-0.93pre2/src/splashd.c 2005-02-27 08:53:46.000000000
-0800
+++ NoCatSplash-test/src/splashd.c 2005-03-16 16:01:04.430311392
-0800
@@ -122,6 +122,7 @@
/* write PID to lockfile */
fprintf(pid_file, "%d\n", getpid());
+ fflush(pid_file);
// fclose(lfp);