Merge pull request #4740 from ben-utzer/systemd-example

Systemd example unit files and readme
This commit is contained in:
Tobias Diekershoff 2018-04-04 12:07:23 +02:00 committed by GitHub
commit d5969c5e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 2 deletions

View file

@ -5,3 +5,17 @@ sample-nginx.config
or Nginx. Pleas check software documentation to know how modify
these examples to make them work on your server.
sample-systemd.timer
sample-systemd.service
Sample systemd unit files to start worker.php periodically.
Please place them in the correct location for your system,
typically this is /etc/systemd/system/friendicaworker.timer
and /etc/systemd/system/friendicaworker.service.
Please report problems and improvements to
!helpers@forum.friendi.ca and @utzer@social.yl.ms or open an
issue in Github (https://github.com/friendica/friendica/issues).
This is for usage of systemd instead of cron to start the worker.php
periodically, the solution is work-in-progress and can surely be improved.

View file

@ -0,0 +1,9 @@
[Unit]
Description=Friendica Worker
[Service]
#User should be the same as the user the webserver runs under, typically http or www
User=http
#Adapt the path in the following line to your system, use 'which php' to find php path,
#provide the absolute path for worker.php
ExecStart=/usr/bin/php /www/path/bin/worker.php &

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run Friendica Poller every n minutes
[Timer]
OnBootSec=120
OnUnitActiveSec=120
[Install]
WantedBy=timers.target