新安裝的服務未在啟動時啟動

新安裝的服務未在啟動時啟動

我已經安裝sabnzbd並且能夠毫無問題地運行service sabnzbdplus start、啟動和停止該程式。service sabnzbdplus stop它的設定檔位於/etc/default/etc/init.d.我確實注意到我的 plex 伺服器中有一個附加文件/etc/init,但sabnzbd沒有。我已經了解了運行級別,並且該rc2.d資料夾也有一個S98sabnzbdplus文件。我的運行等級是2。

這是輸出lsb_release -a; uname -a; apt-cache policy sabnzbdplus

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty
Linux Joshr 3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 201 5 x86_64 x86_64 x86_64 GNU/Linux
sabnzbdplus:
Installed: 0.8.0~beta1-0ubuntu1~jcfp2~trusty
Candidate: 0.8.0~beta1-0ubuntu1~jcfp2~trusty
Version table:
*** 0.8.0~beta1-0ubuntu1~jcfp2~trusty 0
    500 http://ppa.launchpad.net/jcfp/ppa/ubuntu/ trusty/main amd64 Packages
    100 /var/lib/dpkg/status
 0.7.16-1ubuntu1 0
    500 http://us.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages

這是文件的內容/etc/default/sabnzbdplus

# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.

# [required] user or uid of account to run the program as:
USER=Joshr

# [optional] full path to the configuration file of your choice;
#            otherwise, the default location (in $USER's home
#            directory) is used:
CONFIG=

# [optional] hostname/ip and port number to listen on:
HOST=0.0.0.0
PORT=4000

# [optional] extra command line options, if any:
EXTRAOPTS=

這是命令的輸出grep 'Joshr' /etc/passwd

Joshr:x:1000:1000:Joshr,,,:/home/Joshr:/bin/bash

昨天我嘗試將service sabnzbdplus start命令添加到腳本文件中,手動執行腳本時效果很好。然後我在文件中添加了對腳本的調用/etc/rc.local,但這在啟動時仍然不起作用。

相關內容