From b0db8ed40bc3efde47b484f5b2b7d61cf93aba313778fa25adc37146451cc161 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 18 Aug 2017 13:03:55 +0000 Subject: [PATCH] Accepting request 517027 from Application:ERP:Tryton:Factory 1 OBS-URL: https://build.opensuse.org/request/show/517027 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnuhealth?expand=0&rev=13 --- GNUHealth.README.SUSE | 8 ++++++++ gnuhealth-webdav@.service | 21 +++++++++++++++++++++ gnuhealth.changes | 9 +++++++++ gnuhealth.service | 1 + gnuhealth.spec | 12 +++++++++--- 5 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 gnuhealth-webdav@.service diff --git a/GNUHealth.README.SUSE b/GNUHealth.README.SUSE index 7ee6ebf..0a42b68 100644 --- a/GNUHealth.README.SUSE +++ b/GNUHealth.README.SUSE @@ -130,6 +130,14 @@ zypper ar -f http://download.opensuse.org/repositories/Application:/ERP:/Tryton: You may use the GNUHealth mailing list (health@gnu.org) for remarks or questions. +gnuhealth-webdav@.service +========================= + +Starting with GNU Health 3.2, GNU Health comes with its own WebDAV-Server that can be used for shared calendars. In order to enable the WebDAV server, it comes with a systemd-service. As input parameter for the service the database-name on which to operate must be passed. Say your database is called mydb, invoke the service with + +systemctl enable gnuhealth-webdav@mydb.service + +You can start multiple webdav services for different databases in parallel. Digital Signatures ================== diff --git a/gnuhealth-webdav@.service b/gnuhealth-webdav@.service new file mode 100644 index 0000000..24a946b --- /dev/null +++ b/gnuhealth-webdav@.service @@ -0,0 +1,21 @@ +[Unit] +Description=WebDAV Server for GNU Health on Database %I +After=syslog.target +Requires=gnuhealth.service + +[Service] +Type=simple +User=tryton +Group=tryton +PIDFile=/var/lib/trytond/gnuhealth-webdav.pid + +ExecStart=/usr/bin/trytond-webdav -c /etc/tryton/trytond.conf -d %I -v + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# We rely on systemd to restart WebDAV Server if it dies +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/gnuhealth.changes b/gnuhealth.changes index fe36dbe..f63b429 100644 --- a/gnuhealth.changes +++ b/gnuhealth.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Aug 8 18:51:23 UTC 2017 - axel.braun@gmx.de + +- added gnuhealth-webdav@.service +- updated documentation on gnuhealth-webdav@.service +- added alias cdutil for compatibility reasons (not really needed, + as binaries are in /usr/bin anyway) +- fixed path for cdexe + ------------------------------------------------------------------- Sat Jul 22 16:13:36 UTC 2017 - axel.braun@gmx.de diff --git a/gnuhealth.service b/gnuhealth.service index 94ded57..abe0cf5 100644 --- a/gnuhealth.service +++ b/gnuhealth.service @@ -2,6 +2,7 @@ Description=GNU Health server After=syslog.target Requires=postgresql.service +Conflicts=trytond.service [Service] Type=simple diff --git a/gnuhealth.spec b/gnuhealth.spec index 91dffda..18ce4b2 100644 --- a/gnuhealth.spec +++ b/gnuhealth.spec @@ -33,6 +33,7 @@ Source: http://ftp.gnu.org/gnu/health/%{name}-%{version}.tar.gz Source1: GNUHealth.README.SUSE Source2: gnuhealth-control Source3: gnuhealth.service +Source4: gnuhealth-webdav@.service BuildArch: noarch @@ -132,23 +133,27 @@ install -p -m 755 gnuhealth-control %{buildroot}%{_bindir}/gnuhealth-control mkdir -p $RPM_BUILD_ROOT%{_unitdir} install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service +install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/%{name}-webdav@.service %fdupes -s %{buildroot} %pre #Write environment changes to /etc/bash.bashrc.local cat > /etc/bash.bashrc.local << "EOF" -alias cdlogs='cd /var/log/trytond' -alias cdexe='cd /usr/lib/python/site-packages/trytond' +alias cdlogs='cd /var/log/tryton' +alias cdexe='cd $(ls -d /usr/lib/python3.* )/site-packages/trytond' alias cdconf='cd /etc/tryton' -alias cdmods='cd /usr/lib/python/site-packages/trytond/modules' +alias cdmods='cd $(ls -d /usr/lib/python3.* )/site-packages/trytond/modules' alias editconf='${EDITOR} /etc/tryton/trytond.conf' +alias cdutil='cd /usr/bin' EOF %service_add_pre gnuhealth.service +%service_add_pre gnuhealth-webdav@.service %post %service_add_post gnuhealth.service +%service_add_post gnuhealth-webdav@.service %preun %service_del_preun gnuhealth.service @@ -160,6 +165,7 @@ EOF %defattr(744,root,root) %{_bindir}/gnuhealth-control %{_unitdir}/%{name}.service +%{_unitdir}/%{name}-webdav@.service %defattr(-,root,root) %doc README Changelog COPYING gnuhealth-setup version gnuhealthrc GNUHealth.README.SUSE scripts/* backend/* config/* doc/* %{python_sitelib}/*