summaryrefslogtreecommitdiff
path: root/debian/maxlifetime
blob: 21658eb29653b859e3aebd92548600cc1df16dd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh -e

max=1440

for ini in /etc/php5/*/php.ini; do
	cur=$(sed -n -e 's/^[[:space:]]*session.gc_maxlifetime[[:space:]]*=[[:space:]]*\([0-9]\+\).*$/\1/p' $ini 2>/dev/null || true);
	[ -z "$cur" ] && cur=0
	[ "$cur" -gt "$max" ] && max=$cur
done

echo $(($max/60))

exit 0