Dominique Meeùs
Dernière modification le   
retour à la page principale du dossier

Exemple : démarrer OpenOffice.org headless

#!/bin/sh
### BEGIN INIT INFO
# Provides: OpenOffice Headless
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: OpenOffice Headless
### END INIT INFO
# Les versions récentes d’OpenKM et d’Alfresco
# prennent en charge le lancement d’OpenOffice.org
# et ce script n’est plus nécessaire.
PIDFILE=/var/run/openoffice-server.pid
case "$1" in
'start')
if [ -f $PIDFILE ]; then
echo "OpenOffice headless server has already started."
sleep 5
exit
fi
echo "Starting OpenOffice headless server"
soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard & > /dev/null 2>&1
touch $PIDFILE
;;
'stop')
if [ -f $PIDFILE ]; then
echo "Stopping OpenOffice headless server."
killall -9 soffice && killall -9 soffice.bin
rm -f $PIDFILE
exit
fi
echo "Openoffice headless server is not running."
exit
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
Dominique Meeùs . Date: 2011… 2014