]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #4742 from annando/negative-dates
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Apr 2018 19:08:01 +0000 (15:08 -0400)
committerGitHub <noreply@github.com>
Wed, 4 Apr 2018 19:08:01 +0000 (15:08 -0400)
Avoid "Failed to parse time string (-001-11-30T00:00:00+00:00 + 32 days)"

mods/readme.txt
mods/sample-systemd.service [new file with mode: 0644]
mods/sample-systemd.timer [new file with mode: 0644]

index 83878aefb36119bcded638120bf67236083ad93e..4ff8e1067a30e3d36189483865dc53e0955b0b64 100644 (file)
@@ -2,6 +2,20 @@ sample-Lighttpd.config
 sample-nginx.config
 
                Sample configuration files to use Friendica with Lighttpd
-       or Nginx. Pleas check software documentation to know how modify
-       these examples to make them work on your server.
+               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.
diff --git a/mods/sample-systemd.service b/mods/sample-systemd.service
new file mode 100644 (file)
index 0000000..aae2e58
--- /dev/null
@@ -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 &
diff --git a/mods/sample-systemd.timer b/mods/sample-systemd.timer
new file mode 100644 (file)
index 0000000..59f328c
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Run Friendica Poller every n minutes
+
+[Timer]
+OnBootSec=120
+OnUnitActiveSec=120
+
+[Install]
+WantedBy=timers.target