systemd service não inicia na inicialização

0

Sempre que eu reinicio meu Debian Jessie, o NZBget não inicia. Já foi ativado com sudo systemctl enable nzbget

Se eu fizer:

$ sudo systemctl status nzbget
* nzbget.service - NZBGet
Loaded: loaded (/etc/systemd/system/nzbget.service; enabled)
Active: inactive (dead) since Sat 2016-02-20 12:14:55 GMT; 1min 15s ago
Process: 381 ExecStop=/opt/nzbget/nzbget -Q (code=exited,status=0/SUCCESS)
Process: 263 ExecStart=/opt/nzbget/nzbget -D (code=exited, status=0/SUCCESS)

Se eu fizer um sudo system start nzbget , ele será iniciado.

aqui está o arquivo de serviço em sudo nano /etc/systemd/system/nzbget.service

[Unit]
Description=NZBGet
After=network.target
RequiresMountsFor=/<pathtomount>

[Service]
User=osmc
Group=osmc
ExecStart=/opt/nzbget/nzbget -D
ExecStop=/opt/nzbget/nzbget -Q

# process will demonize and parent return ok
Type=forking
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure

[Install]
# Needed to run nzbget at boot
WantedBy=multi-user.target

Alguma sugestão sobre o assunto

 -- Logs begin at Sat 2016-02-20 12:31:40 GMT, end at Sun 2016-02-21 10:53:14 GMT. --
Feb 20 12:31:43 osmc nzbget[279]: /home/osmc/Downloads/nzbget.log: No such file or directory
Feb 20 12:31:43 osmc nzbget[279]: /home/osmc/Downloads/nzbget.log: No such file or directory
Feb 20 12:31:43 osmc nzbget[279]: /home/osmc/Downloads/nzbget.log: No such file or directory
Feb 20 12:31:43 osmc nzbget[279]: /home/osmc/Downloads/nzbget.log: No such file or directory
Feb 20 12:31:43 osmc nzbget[279]: nzbget.conf(70): Invalid value for option "TempDir" (/home/osmc/Downloads/tmp/): could not read information for dir
Feb 20 12:31:43 osmc nzbget[279]: nzbget.conf(67): Invalid value for option "QueueDir" (/home/osmc/Downloads/queue/): could not read information for 
Feb 20 12:31:43 osmc nzbget[279]: nzbget.conf(61): Invalid value for option "NzbDir" (/home/osmc/Downloads/nzb/): could not read information for dire
Feb 20 12:31:43 osmc nzbget[391]: /home/osmc/Downloads/nzbget.log: No such file or directory
Feb 20 12:31:43 osmc nzbget[391]: /home/osmc/Downloads/nzbget.log: No such file or directory
Feb 20 12:31:43 osmc nzbget[391]: /home/osmc/Downloads/nzbget.log: No such file or directory
Feb 20 12:31:43 osmc nzbget[391]: nzbget.conf(70): Invalid value for option "TempDir" (/home/osmc/Downloads/tmp/): could not read information for dir
Feb 20 12:31:43 osmc nzbget[391]: nzbget.conf(67): Invalid value for option "QueueDir" (/home/osmc/Downloads/queue/): could not read information for 
Feb 20 12:31:43 osmc nzbget[391]: nzbget.conf(61): Invalid value for option "NzbDir" (/home/osmc/Downloads/nzb/): could not read information for dire
Feb 20 12:31:43 osmc nzbget[391]: Unable to send request to nzbget-server at 127.0.0.1 (port 6789)
    
por eekfonky 20.02.2016 / 13:26

1 resposta

0

Veja a edição acima. Precisava disso na seção [unit]: RequiresMountsFor=/<pathtomount>

Agora tudo está funcionando, pois o serviço começa depois que a unidade externa é montada

    
por 28.02.2016 / 20:25