Bladeren bron

Update Markdown docs to replace log overwriting with appending (#9581)

* Update Markdown docs to replace log overwriting with appending

Closes https://github.com/FreshRSS/FreshRSS/issues/9577

* Wording tweak for cron job log appending

https://github.com/FreshRSS/FreshRSS/pull/9581#discussion_r4612359046

Co-Authored-By: @Frenzie

* Search & Replace

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Ben Keith 3 uur geleden
bovenliggende
commit
da8138c414

+ 1 - 1
Docker/README.md

@@ -646,7 +646,7 @@ Remember not pass the `CRON_MIN` environment variable to your Docker run, to avo
 Example on Debian / Ubuntu: Create `/etc/cron.d/FreshRSS` with:
 
 ```text
-7,37 * * * * root docker exec --user www-data freshrss php ./app/actualize_script.php > /tmp/FreshRSS.log 2>&1
+7,37 * * * * root docker exec --user www-data freshrss php ./app/actualize_script.php >> /tmp/FreshRSS.log 2>&1
 ```
 
 ### Option 3) Cron as another instance of the same FreshRSS Docker image

+ 2 - 2
README.fr.md

@@ -168,7 +168,7 @@ C’est une bonne idée d’utiliser le même utilisateur que votre serveur Web
 Par exemple, pour exécuter le script toutes les heures :
 
 ```text
-8 * * * * php /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
+8 * * * * php /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1
 ```
 
 ## Exemple pour Debian / Ubuntu
@@ -176,7 +176,7 @@ Par exemple, pour exécuter le script toutes les heures :
 Créer `/etc/cron.d/FreshRSS` avec :
 
 ```text
-7,37 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
+7,37 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1
 ```
 
 # Conseils

+ 8 - 2
docs/en/admins/08_FeedUpdates.md

@@ -30,13 +30,19 @@ It’s advisable that you run the Cron job as your Web server user (often `www-d
 
 ### Example on Debian/Ubuntu
 
-To run the updater script every hour, and 10 minutes past the hour:
+To run the updater script every hour, at 10 minutes past the hour:
 
 Edit `/etc/crontab` and append the following line:
 ```text
-10 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
+10 * * * * www-data php -f /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1
 ```
 
+This will append new log lines to the end of the existing log file. You may want to set up `logrotate` or a similar utility to prevent the logfile from growing too large.
+
+> FreshRSS error: This PHP script may only be invoked from command line!
+
+If you receive this error message in the cron job's logs, try replacing `php` with the contents of `which php`, like `/usr/local/bin/php`.
+
 ## Systemd as a trigger
 
 Some systems can’t use a Cron job, but they can use systemd. It’s easy to configure it to mimic Cron’s features.

+ 3 - 1
docs/en/users/09_refreshing_feeds.md

@@ -46,9 +46,11 @@ The script is named *actualize_script.php* and is located in the *app* folder. T
 Here is an example to trigger article update every hour.
 
 ```cron
-0 * * * * php /path/to/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
+0 * * * * php -f /usr/share/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1
 ```
 
+For further advice on cron, see [the admin instructions for cron](../admins/08_FeedUpdates.md#cron-as-a-trigger).
+
 ## Online cron
 
 If you do not have access to the installation server scheduled task, you can still automate the update process.

+ 1 - 1
docs/fr/users/03_Main_view.md

@@ -39,7 +39,7 @@ Ci-dessous vous trouverez un exemple permettant la mise à jour des articles
 toutes les heures.
 
 ```cron
-0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1
+0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1
 ```
 
 « Paramètres de configuration du script; Ils sont utilisables simultanément

+ 2 - 2
docs/i18n/freshrss.fr.po

@@ -8340,8 +8340,8 @@ msgstr ""
 #. type: Fenced code block (cron)
 #: en/./users/09_refreshing_feeds.md:48
 #, no-wrap
-msgid "0 * * * * php /path/to/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1\n"
-msgstr "0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log 2>&1\n"
+msgid "0 * * * * php /path/to/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1\n"
+msgstr "0 * * * * php /chemin/vers/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log 2>&1\n"
 
 #. type: Title ##
 #: en/./users/09_refreshing_feeds.md:52

+ 1 - 1
docs/i18n/templates/freshrss.pot

@@ -7837,7 +7837,7 @@ msgstr ""
 #: en/./users/09_refreshing_feeds.md:48
 #, no-wrap
 msgid ""
-"0 * * * * php /path/to/FreshRSS/app/actualize_script.php > /tmp/FreshRSS.log "
+"0 * * * * php /path/to/FreshRSS/app/actualize_script.php >> /tmp/FreshRSS.log "
 "2>&1\n"
 msgstr ""