summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/updater/Makefile27
-rw-r--r--bin/updater/README.rst65
-rw-r--r--bin/updater/systemd/owncloud-news-updater.service2
3 files changed, 78 insertions, 16 deletions
diff --git a/bin/updater/Makefile b/bin/updater/Makefile
index 80f40509d..486812877 100644
--- a/bin/updater/Makefile
+++ b/bin/updater/Makefile
@@ -1,12 +1,19 @@
all: install
+
install: install-systemd
+
clean:
- sudo rm -rf dist
- sudo rm -rf MANIFEST
- sudo rm -rf build
- sudo rm -rf owncloud_news_updater.egg-info
+ rm -rf dist
+ rm -rf MANIFEST
+ rm -rf build
+ rm -rf owncloud_news_updater.egg-info
+
+
+update: clean
+ pip3 uninstall owncloud_news_updater
+ python3 setup.py install
preinitsetup: clean
@@ -28,24 +35,24 @@ install-systemd: preinitsetup
install-sysvinit: preinitsetup
- cp $(CURDIR)/sysvinit/owncloud-news-updater /etc/rc.d/
+ cp $(CURDIR)/sysvinit/owncloud-news-updater /etc/init.d/
@echo ""
@echo "Installed files. Please edit your config in /etc/owncloud/news/updater.ini and run:"
- @echo " TBD"
- @echo " TBD"
+ @echo " sudo update-rc.d /etc/init.d/owncloud-news-updater defaults"
+ @echo " sudo /etc/init.d/owncloud-news-updater start"
@echo "to run the updater on startup and:"
- @echo " TBD"
+ @echo " sudo /etc/init.d/owncloud-news-updater restart"
@echo "to reload the changes if you change the config in /etc/owncloud/news/updater.ini"
make uninstall: clean
rm -rf /etc/owncloud/news/updater.ini
rm -rf /etc/systemd/systemd/owncloud-news-updater.service
- # TBD uninstall sysvinit
+ rm -rf /etc/init.d/owncloud-news-updater
pip3 uninstall owncloud_news_updater
@echo ""
@echo "Uninstalled files. Please run: "
@echo " systemctl disable owncloud-news-updater"
- @echo "to remove it from boot" \ No newline at end of file
+ @echo "to remove it from boot"
diff --git a/bin/updater/README.rst b/bin/updater/README.rst
index c588b28e8..6bace24b4 100644
--- a/bin/updater/README.rst
+++ b/bin/updater/README.rst
@@ -1,7 +1,7 @@
ownCloud News Updater
=====================
-ownCloud does not require people to install threading or multiprocessing libraries. Because the feed update process is mainly limited by I/O, parallell fetching of RSS feed updates can speed up the updating process a lot. In addition the cronjob can get `into a deadlock <https://github.com/owncloud/core/issues/3221>`_ which will halt cause your feeds not to be updated. This can be soled by using a script that uses the `updater API <https://github.com/owncloud/news/wiki/Cron-1.2>`_
+ownCloud does not require people to install threading or multiprocessing libraries. Because the feed update process is mainly limited by I/O, parallell fetching of RSS feed updates can speed up the updating process significantly. In addition the cronjob can get `into a deadlock <https://github.com/owncloud/core/issues/3221>`_ which will cause the updater to get stuck resulting in your feeds not to being updated anymore. This can be soled by using a script that uses the `updater API <https://github.com/owncloud/news/wiki/Cron-1.2>`_
Preinstallation
---------------
@@ -14,6 +14,36 @@ to::
useCronUpdates = false
+Then install the following packages (my vary depending on your distribution):
+
+* python3-pip
+* python3-setuptools
+* make
+
+If you are **on Debian 7** you want to create a symlink for pip to make use of the Makefile::
+
+ sudo ln -s /usr/bin/pip-3.2 /usr/bin/pip3
+
+
+Updating
+--------
+
+.. note:: In general it is recommended to update the updater after every News app update
+
+If you have installed the updater on your system you can update it by running::
+
+ sudo make update
+
+The **init and config files won't be updated** and you need to update them manually in case there is a breaking change therefore follow the `CHANGELOG.md <https://github.com/owncloud/news/blob/master/CHANGELOG.md>`_ to stay up to date with the updater changes.
+
+Finally reload the systemd service::
+
+ sudo systemctl restart owncloud-news-updater
+
+or SysVinit script::
+
+ sudo /etc/init.d/owncloud-news-updater restart
+
Installation: No init system
----------------------------
@@ -59,15 +89,32 @@ If you make changes to the **updater.ini** file don't forget to reload the servi
Installation: SysVinit
----------------------
-TBD
+.. note:: Debian 7 (wheezy) is the only supported Linux distribution for SysVinit and support will be dropped once Debian 8.1 is released
+
+To install the script for SysVinit run::
+
+ sudo make install-sysvinit
+
+Then edit the config in **/etc/owncloud/news/updater.ini** with your details and run::
+
+ owncloud-news-updater -c /etc/owncloud/news/updater.ini
+
+to test your settings. If everything worked out fine, enable the init script with::
+
+ sudo update-rc.d /etc/init.d/owncloud-news-updater defaults
+ sudo /etc/init.d/owncloud-news-updater start
+
+If you make changes to the **updater.ini** file don't forget to reload the service with::
+
+ sudo /etc/init.d/owncloud-news-updater restart
Uninstallation
--------------
-To uninstall the script make sure that pip3 is installed (usually called python3-pip) and run::
+To uninstall the updater run::
- make uninstall
+ sudo make uninstall
Self signed certificates
@@ -80,9 +127,17 @@ Should you use a self signed certificate over SSL, first consider getting a free
The directories might vary depending on your distribution and Python version.
+Debugging
+---------
+
+If you are using JournalD which is included in SystemD you can read the error log using::
+
+ journalctl -u owncloud-news-updater.service
+
+
Development
-----------
If you want to edit the python code and test it run::
- python3 -m owncloud_news -c /path/to/config.ini \ No newline at end of file
+ python3 -m owncloud_news -c /path/to/config.ini
diff --git a/bin/updater/systemd/owncloud-news-updater.service b/bin/updater/systemd/owncloud-news-updater.service
index b0632cf1c..528a4234a 100644
--- a/bin/updater/systemd/owncloud-news-updater.service
+++ b/bin/updater/systemd/owncloud-news-updater.service
@@ -4,7 +4,7 @@ After=default.target
[Service]
Type=simple
User=nobody
-ExecStart=/usr/bin/python3 /usr/local/bin/owncloud-news-updater -c /etc/owncloud/news/updater.ini
+ExecStart=/usr/bin/python3 /usr/bin/owncloud-news-updater -c /etc/owncloud/news/updater.ini
[Install]
WantedBy=default.target