2021-07-27 14:30:18
2021-07-27 08:33:04
2021-07-27 08:31:52
285772
Hello !Friendica Support
does anyone here have the worker running with systemd?
friendica.service:
does anyone here have the worker running with systemd?
root@WEB:~# systemctl daemon-reload
root@WEB:~# systemctl start friendica.service
root@WEB:~# systemctl status friendica.service
* friendica.service - Friendica daemon
Loaded: loaded (/etc/systemd/system/friendica.service; disabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Tue 2021-07-27 10:26:49 CEST; 4s ago
Process: 47795 ExecStart=/usr/bin/php7.4 bin/daemon.php start (code=exited, status=0/SUCCESS)
Process: 47797 ExecStop=/usr/bin/php7.4 bin/daemon.php stop (code=exited, status=0/SUCCESS)
Main PID: 47795 (code=exited, status=0/SUCCESS)
CPU: 189ms
Jul 27 10:26:49 WEB systemd[1]: friendica.service: Scheduled restart job, restart counter is at 5.
Jul 27 10:26:49 WEB systemd[1]: Stopped Friendica daemon.
Jul 27 10:26:49 WEB systemd[1]: friendica.service: Start request repeated too quickly.
Jul 27 10:26:49 WEB systemd[1]: friendica.service: Failed with result 'start-limit-hit'.
Jul 27 10:26:49 WEB systemd[1]: Failed to start Friendica daemon.
friendica.service:
[Unit]
Description=Friendica daemon
After=network.target mysqld.service
[Service]
Type=simple
User=USER
Group=USER
WorkingDirectory=/var/customers/webs/USER/rollenspiel.group
ExecStart=/usr/bin/php7.4 bin/daemon.php start
ExecStop=/usr/bin/php7.4 bin/daemon.php stop
Restart=always
[Install]
WantedBy=multi-user.target
Michael Vogel
Als Antwort auf Tealk • • •utzer [Friendica]
Als Antwort auf Michael Vogel • • •But yes, I have it running with systemd and it works fine.
Tealk
Als Antwort auf utzer [Friendica] • • •utzer [Friendica]
Als Antwort auf Tealk • • •.service:
utzer [Friendica]
Als Antwort auf utzer [Friendica] • • •Tealk
Als Antwort auf utzer [Friendica] • • •utzer [Friendica]
Als Antwort auf Tealk • • •Tealk
Als Antwort auf utzer [Friendica] • • •utzer [Friendica]
Als Antwort auf Tealk • • •So you say there should be one PID for each of them? Hmm but it works like this, I guess systemd just checks if there is a PID file and gives a fault if there is? Not sure.
Tealk
Als Antwort auf utzer [Friendica] • • •I have always understood PIDFile so that systemd creates a file, maybe it does not bother in this case because the daemon also just enters the pid
elrido
Als Antwort auf Tealk • •The script starts with a shebang: https://github.com/friendica/friendica/blob/develop/bin/daemon.php#L1
If it is executable, the kernel will parse that first line and if it starts with shebang it will instead call that binary and pass the script path to it as an argument. So it will really execute "/usr/bin/env php <path to your daemon.php script>" (and env will just resolve the path of the php binary and call that with all arguments - it's needed because not all UNICES have their binaries in the same paths).
mögen das
Tealk und utzer [Friendica] mögen das.
utzer [Friendica]
Als Antwort auf elrido • • •And I learned how that thing is called in the first line of a normal shell script, it is a shell bang.
Thanks!