NicoTheBrush ha scritto:
Puoi provare a postare il file, vedo se a leggerlo mi salta all'occhio qualcosa non potendo provarlo
Ho rimesso tutto a posto rifacendo tutto... ora nn dà + l'errore sul file... A questo punto eseguo lo start
E subito dopo lo stop ma mi esce questo... è un errore o va bene?
root@debian:~# sudo /etc/init.d/openoffice-server start
Starting OpenOffice Headless Server: openoffice-server.
root@debian:~# sudo /etc/init.d/openoffice-server stop
Stopping OpenOffice Headless Server: start-stop-daemon: warning: failed to kill 1514: No such process
openoffice-server.
Cmq nel dubbio ti lascio il file non so se possa servire....
#!/bin/sh
### BEGIN INIT INFO
# Provides: libreoffice-server
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Libre Office Headless
# Description: Start/Stop Script for Libre Office Headless Server
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/soffice
NAME=openoffice-server
DESC="OpenOffice Headless Server"
USER=root
# pidfile
PIDFILE=/var/run/$NAME.pid
# Additional options that are passed to the Daemon.
DAEMON_OPTS='-headless -nologo -nofirststartwizard -norestore "-accept=socket,host=localhost,port=8100;urp;"'
[ -x $DAEMON ] || exit 0
checkpid() {
[ -f $PIDFILE ] || return 1
pid=`cat $PIDFILE`
[ -d /proc/$pid ] && return 0
return 1
}
case "${1}" in
start)
echo -n "Starting ${DESC}: "
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid ${USER} --background --make-pidfile \
--exec ${DAEMON} -- ${DAEMON_OPTS}
echo "${NAME}."
;;
stop)
echo -n "Stopping ${DESC}: "
start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
--oknodo
echo "${NAME}."
;;
restart|force-reload)
echo -n "Restarting ${DESC}: "
start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \
--oknodo
sleep 1
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid ${USER} --background --make-pidfile \
--exec ${DAEMON} -- ${DAEMON_OPTS}
echo "${NAME}."
;;
*)
N=/etc/init.d/${NAME}
echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0