无法使用服务命令与debian 8(杰西)

为了将LibreOffice 4.4安装到我的Debian 8(Jessie)中,我从Debian 7.5中获得了所有的bash脚本,并以相同的方式将它们运行到D8中。

我知道这个新版本有一些变化,但是我不能像这样使用我的服务

sudo service libreoffice start 

当这样做不会启动任何东西,我必须开始使用:

 sudo /etc/init.d/libreoffice start 

和奇怪的事情,当做(坏参数):

 sudo service libreoffice dzedjiodjzedj 

…脚本完美执行,并显示我捕捉到的错误

这是我的/etc/init.d/libreoffice文件:

  # # libreoffice This shell script takes care of starting and stopping the LibreOffice Daemon # # chkconfig: - 80 20 # ### BEGIN INIT INFO # Provides: libreofficedaemon # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Init.d script to run a LibreOffice Daemon # Short-Description: start and stop LibreOffice Daemon ### END INIT INFO NAME="LibreOffice Service" LIBREOFFICE_HOME=/opt/libreoffice4.4 LIBREOFFICE_USER=libreoffice export LIBREOFFICE_HOME LIBREOFFICE_USER start() { echo -ne "Starting $NAME. \n" su $LIBREOFFICE_USER -c "$LIBREOFFICE_HOME/start.sh" } stop() { echo -ne "Stopping $NAME. \n" su $LIBREOFFICE_USER -c "$LIBREOFFICE_HOME/stop.sh" } kill() { echo -ne "Force close of $NAME. " killall -u $LIBREOFFICE_USER } cd $LIBREOFFICE_HOME case "$1" in start|stop) $1;; restart) stop; start;; kill) kill;; *) echo "Usage: /etc/init.d/libreoffice {start|stop|restart|kill}" exit 1 ;; esac exit 0 

而我刚刚运行tomcat8服务昨天,我刚刚开始手动服务和sudo service tomcat8 start工作后,但没有libreoffice一个..

来自Debian Jessie发行说明:

当询问/etc/init.d目录中的任何文件或/etc/manpath.config文件是否应由软件包维护人员的版本replace时,通常需要回答“是”以确保系统一致性

用systemd你现在必须使用systemctl:

 sudo systemctl start libreoffice 

这里有一些更多的信息