Próbuję uruchomić aplikację webową butelek, którą napisałem przy użyciu systemd. Zrobiłem plik /etc/systemd/user/bottle.service
o następującej treści:Uruchamianie serwera butelkowego przez systemd?
[Unit]
Description=Bottled fax service
After=syslog.target
[Service]
Type=simple
User=fax
Group=fax
WorkingDirectory=/home/fax/bottlefax/
ExecStart=/usr/bin/env python3 server.py
StandardOutput=syslog
StandardError=syslog
Restart=always
RestartSec=2
[Install]
WantedBy=bottle.target
Jednak kiedy próbuję go uruchomić, a to nie jest drukowany w journalctl
:
Jun 10 17:33:31 nano systemd[1]: Started Bottled fax service.
Jun 10 17:33:31 nano systemd[1]: Starting Bottled fax service...
Jun 10 17:33:31 nano systemd[2380]: Failed at step GROUP spawning /usr/bin/env: No such process
Jun 10 17:33:31 nano systemd[1]: bottle.service: main process exited, code=exited, status=216/GROUP
Jun 10 17:33:31 nano systemd[1]: Unit bottle.service entered failed state.
Jun 10 17:33:31 nano systemd[1]: bottle.service failed.
Jak mam rozwiązać ten problem?
Edit:
Zmiana na /usr/bin/python3
jak inni sugerują wyniki w tym samym błędem (choć zmieniły plików):
Jun 10 18:43:48 nano systemd[1]: Started Bottled fax service.
Jun 10 18:43:48 nano systemd[1]: Starting Bottled fax service...
Jun 10 18:43:48 nano systemd[2579]: Failed at step GROUP spawning /usr/bin/python3: No such process
Jun 10 18:43:48 nano systemd[1]: bottle.service: main process exited, code=exited, status=216/GROUP
Jun 10 18:43:48 nano systemd[1]: Unit bottle.service entered failed state.
Jun 10 18:43:48 nano systemd[1]: bottle.service failed.
Czy jesteś pewien, że '/ usr/bin/env' jest tym, czego potrzebujesz? Co powiesz na '/ usr/bin/python3'? – bbayles