我已经安装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
,但在启动时仍然不起作用。