Commit 01bf58e2 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1331 Added pre and postun directives.

Released under the Affero GNU General Public License (AGPL) version 3.
parent fe50c33d
...@@ -38,10 +38,12 @@ Requires: php-soap ...@@ -38,10 +38,12 @@ Requires: php-soap
Requires: php-mbstring Requires: php-mbstring
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: php-posix Requires: php-posix
Requires(pre): shadow
%else %else
Requires: php-process Requires: php-process
%endif %endif
%endif %endif
Requires(pre): %_sbindir/groupadd
%description -n %name-common %description -n %name-common
Z-push is an implementation of the ActiveSync protocol which is used 'over-the-air' for multi platform ActiveSync devices. Devices supported are including Windows Mobile, Android, iPhone, and Nokia. With Z-push any groupware can be connected and synced with these devices. Z-push is an implementation of the ActiveSync protocol which is used 'over-the-air' for multi platform ActiveSync devices. Devices supported are including Windows Mobile, Android, iPhone, and Nokia. With Z-push any groupware can be connected and synced with these devices.
...@@ -400,6 +402,13 @@ install -Dpm 644 config/nginx/z-push.conf "$b/%_sysconfdir/nginx/sites-available ...@@ -400,6 +402,13 @@ install -Dpm 644 config/nginx/z-push.conf "$b/%_sysconfdir/nginx/sites-available
mkdir -p "$b/%_mandir/man1" mkdir -p "$b/%_mandir/man1"
cp man/*.1 "$b/%_mandir/man1" cp man/*.1 "$b/%_mandir/man1"
%pre -n %name-common
%_bindir/getent group z-push > /dev/null || %_sbindir/groupadd -r z-push
%_bindir/getent passwd apache > /dev/null && %_sbindir/usermod -a -G z-push apache
%_bindir/getent passwd wwwrun > /dev/null && %_sbindir/usermod -a -G z-push wwwrun
%_bindir/getent passwd nginx > /dev/null && %_sbindir/usermod -a -G z-push nginx
exit 0
%post -n %name-config-apache %post -n %name-config-apache
%if 0%{?suse_version} %if 0%{?suse_version}
service apache2 reload || true service apache2 reload || true
...@@ -440,13 +449,8 @@ service nginx reload || true ...@@ -440,13 +449,8 @@ service nginx reload || true
%defattr(-, root, root) %defattr(-, root, root)
%dir %_sysconfdir/z-push %dir %_sysconfdir/z-push
%if 0%{?suse_version} %config(noreplace) %attr(0640,root,z-push) %_sysconfdir/z-push/policies.ini
%config(noreplace) %attr(0640,root,www) %_sysconfdir/z-push/policies.ini %config(noreplace) %attr(0640,root,z-push) %_sysconfdir/z-push/z-push.conf.php
%config(noreplace) %attr(0640,root,www) %_sysconfdir/z-push/z-push.conf.php
%else
%config(noreplace) %attr(0640,root,apache) %_sysconfdir/z-push/policies.ini
%config(noreplace) %attr(0640,root,apache) %_sysconfdir/z-push/z-push.conf.php
%endif
%config(noreplace) %attr(0640,root,root) %_sysconfdir/logrotate.d/z-push.lr %config(noreplace) %attr(0640,root,root) %_sysconfdir/logrotate.d/z-push.lr
...@@ -459,8 +463,8 @@ service nginx reload || true ...@@ -459,8 +463,8 @@ service nginx reload || true
%doc src/LICENSE %doc src/LICENSE
%if 0%{?suse_version} %if 0%{?suse_version}
%attr(750,wwwrun,www) %dir %_localstatedir/lib/z-push %attr(770,wwwrun,z-push) %dir %_localstatedir/lib/z-push
%attr(750,wwwrun,www) %dir %_localstatedir/log/z-push %attr(770,wwwrun,z-push) %dir %_localstatedir/log/z-push
%else %else
%attr(750,apache,apache) %dir %_localstatedir/lib/z-push %attr(750,apache,apache) %dir %_localstatedir/lib/z-push
%attr(750,apache,apache) %dir %_localstatedir/log/z-push %attr(750,apache,apache) %dir %_localstatedir/log/z-push
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment