diff options
author | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2021-11-24 11:47:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 11:47:26 +0300 |
commit | 08ce014a9753c7174ffac81994d818081f67560e (patch) | |
tree | 0ee6f7bbc42abb5524090883c6074491cc316187 | |
parent | e650e565a53449e3874ac355377b2ae616ebc05c (diff) | |
parent | 1c55ffe819b4afe9c13d91a4828ac14e8962f32d (diff) |
Merge pull request #40 from wonderfulShrineMaidenOfParadise/openrc
README.rst: Add OpenRC service
-rw-r--r-- | README.rst | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -250,6 +250,35 @@ varies from distribution to distribution, e.g in Debian and Ubuntu you would use If you are using the REST API, most of the time you can get away by using **nobody** as user, but again, that might vary depending on your distribution. +Running The Updater As OpenRC Service +-------------------------------------- +On Alpine/postmarketOS/Gentoo/Artix or the other OpenRC based distros, you can create a simple text file at +**/etc/init.d/nextcloud-news-updater** with the following contents: + +.. code:: sh + + #!/sbin/openrc-run + + description="Nextcloud News Updater Daemon" + + pidfile=${pidfile:-/run/nextcloud-news-updater.pid} + output_log="/var/log/nextcloud-news-updater/output.log" + error_log="/var/log/nextcloud-news-updater/error.log" + + command=${command:-/usr/bin/nextcloud-news-updater} + command_user=${command_user:-www-data:www-data} + command_args="-c /etc/nextcloud/news/updater.ini" + command_background=true + +Then to enable and start it run:: + + sudo -u www-data mkdir /var/log/nextcloud-news-updater + sudo -u www-data touch /var/log/nextcloud-news-updater/output.log \ + /var/log/nextcloud-news-updater/error.log + sudo chmod 755 /etc/init.d/nextcloud-news-updater + sudo rc-update add nextcloud-news-updater + sudo rc-service nextcloud-news-updater start + Troubleshooting ---------------- If you are having trouble debugging updater errors, try running it again using the **info** loglevel:: |