Ich habe folgende Start-Stopp-Skript:"start-stop-daemon: unable stat"
NAME="examplestartstop"
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
LOGFILE="/var/log/$NAME/start-stop-daemon.log"
APP_DIR="/usr/bin"
APP_BIN="tail -250f /var/log/apache2/error.log"
USER="minecraft"
GROUP="minecraft"
# Include functions
set -e
. /lib/lsb/init-functions
start() {
echo "Starting '$NAME'... "
start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec "$APP_DIR/$APP_BIN" $LOGFILE || true
echo "done"
}
Wenn ich versuche, das Skript i folgende Ausgabe auszuführen:
$ ./test start
Starting 'examplestartstop'...
start-stop-daemon: unable to stat /usr/bin/tail -250f /var/log/apache2/error.log (No such file or directory)
done
Was habe ich am $APP_DIR/$APP_BIN
Teil falsch gemacht?
, wenn ich dies tun, tritt ein Fehler Start-Stopp -daemon: unerkannte Option '--- 250f' –
Haben Sie den Abstand zwischen '--' und' $ APP_ARGS' vermisst? Und bitte starten Sie eine neue Frage für Ihr Problem. – scai