Summary(pl.UTF-8): Wspólne katalogi dla różnych wersji PHP
Name: php-dirs
Version: 1.1
-Release: 7
+Release: 8
License: GPL
Group: Base
Source0: php-session.sh
Requires(postun): /usr/sbin/groupdel
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
-Requires: tmpwatch
+Suggests: tmpwatch
Provides: group(http)
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
#!/bin/sh
-if [ -x /usr/bin/php ] ; then
+
+[ -x /usr/sbin/tmpwatch ] || exit
+
+if [ -x /usr/bin/php ]; then
RUNTIME5=$(/usr/bin/php -r '$t = round(ini_get("session.gc_maxlifetime")/3600); if ($t<1) $t=1; echo $t;' 2> /dev/null)
elif [ -r /etc/php/php.ini ]; then
RUNTIME5=$(awk -F"=" '/^session.gc_maxlifetime[ \t]*=/ { t=sprintf("%d", ($2/3600)); if (t<1) { t=1; }; print t; exit;}' /etc/php/php.ini)
fi
-if [ -x /usr/bin/php4 ] ; then
+if [ -x /usr/bin/php4 ]; then
RUNTIME4=$(/usr/bin/php4 -r '$t = round(ini_get("session.gc_maxlifetime")/3600); if ($t<1) $t=1; echo $t;' 2> /dev/null)
elif [ -r /etc/php4/php.ini ]; then
RUNTIME4=$(awk -F"=" '/^session.gc_maxlifetime[ \t]*=/ { t=sprintf("%d", ($2/3600)); if (t<1) { t=1; }; print t; exit;}' /etc/php4/php.ini)