[Debian]:MiniVend start/stop Skript für Debian
Das folgende Skript für /etc/init.d funktioniert schon ganz gut.
Wenn ich es jedoch 2x starte, kommt folgende Meldung:
(null) already running.
Das ist noch ein wenig unschön (dpkg 1.4.1.11).
Verbesserungsvorschläge sind gefragt ...
#! /bin/sh
# minivend - Manage the MiniVend daemon
# Copyright (C) 1999 Stefan Hornburg
# Author: Stefan Hornburg <racke@linuxia.net>
# Maintainer: Stefan Hornburg <racke@linuxia.net>
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
# This file is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this file; see the file COPYING. If not, write to the Free
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# stuff you may change if running this script manually
MINIVEND_ROOT=/home/racke/mvend
MINIVEND_USER=racke
INITD=/etc/init.d
# end of stuff
NAME=minivend
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=$MINIVEND_ROOT/bin/minivend
PIDFILE=$MINIVEND_ROOT/etc/minivend.pid
CONF=$MINIVEND_ROOT/minivend.cfg
# MiniVend server available ?
test -f $DAEMON || exit 0
# See how we were called
case "$1" in
start)
start-stop-daemon --start -p $PIDFILE --startas $DAEMON \
-- -unix -serve
;;
stop)
start-stop-daemon --stop -p $PIDFILE
;;
restart|reload|force-reload)
$0 stop
$0 start
;;
*)
echo "Usage: $INITD/$NAME {start|stop|restart|reload|force-reload}"
exit 1
esac
exit 0
--
LinuXia - Solutions of Cool Competence - Internetprogramming and more
D-30163 Hannover, Waldstraße 4, 0511-3941290 (http://www.linuxia.net/)
Wir realisieren Onlineshops mit Minivend (http://www.minivend.com)
und MiniMate (http://www.linuxia.net/minimate/).
------------------------------------------------
Um sich aus der Liste auszutragen schicken Sie
bitte eine E-Mail an majordomo@jfl.de die im Body
"unsubscribe debian-user-de <deine emailadresse>"
enthaelt.
Bei Problemen bitte eine Mail an: Jan.Otto@jfl.de
------------------------------------------------
Anzahl der eingetragenen Mitglieder: 718
Reply to: