시스템 사용자 jackett
( useradd -r jackett
)를 생성하고 CentOS 7에서 해당 사용자로 systemd 서비스를 실행해 보았습니다.
서비스 파일:
[Unit]
Description=Jackett Daemon
After=network-online.target
[Service]
Type=simple
user=jackett
group=jackett
ExecStart=/usr/bin/mono --debug /opt/Jackett/JackettConsole.exe --NoRestart
[Install]
WantedBy=multi-user.target
서비스 상태:
[root@server Jackett]# systemctl status jackett
● jackett.service - Jackett Daemon
Loaded: loaded (/usr/lib/systemd/system/jackett.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2019-02-23 23:42:23 +03; 11min ago
Main PID: 24735 (mono)
CGroup: /system.slice/jackett.service
└─24735 /usr/bin/mono --debug /opt/Jackett/JackettConsole.exe --NoRestart
Feb 23 23:42:24 server mono[24735]: 02-23 23:42:24 Info Loading Cardigann definition /opt/Jackett/Definitions/yourexotic.yml
Feb 23 23:42:24 server mono[24735]: 02-23 23:42:24 Info Loading Cardigann definition /opt/Jackett/Definitions/zamundanet.yml
Feb 23 23:42:24 server mono[24735]: 02-23 23:42:24 Info Loading Cardigann definition /opt/Jackett/Definitions/zelkaorg.yml
Feb 23 23:42:24 server mono[24735]: 02-23 23:42:24 Info Loading Cardigann definition /opt/Jackett/Definitions/zooqle.yml
Feb 23 23:42:24 server mono[24735]: 02-23 23:42:24 Info Loading Cardigann definition /opt/Jackett/Definitions/ztracker.yml
Feb 23 23:42:24 server mono[24735]: 02-23 23:42:24 Info Adding aggregate indexer
Feb 23 23:42:25 server mono[24735]: Hosting environment: Production
Feb 23 23:42:25 server mono[24735]: Content root path: /opt/Jackett/Content
Feb 23 23:42:25 server mono[24735]: Now listening on: http://[::]:9117
Feb 23 23:42:25 server mono[24735]: Application started. Press Ctrl+C to shut down.
답변1
문제는 분명히 systemd가 다음 User
대신 에 case:에 특별한 주의를 기울인다는 것입니다 user
.
[Unit]
Description=Jackett Daemon
After=network-online.target
[Service]
Type=simple
User=jackett
Group=jackett
ExecStart=/usr/bin/mono --debug /opt/Jackett/JackettConsole.exe --NoRestart
[Install]
WantedBy=multi-user.target
인용하다: