From 5e40448654b711c59282a41693133f01e3f5b495 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 2 May 2018 11:04:04 +0200 Subject: [PATCH] - ver 1.8. use ls to find possible php commands --- php-dirs.spec | 2 +- php-session.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php-dirs.spec b/php-dirs.spec index 1eb58aa..6a303b0 100644 --- a/php-dirs.spec +++ b/php-dirs.spec @@ -5,7 +5,7 @@ Summary: Common dirs for PHP Summary(pl.UTF-8): Wspólne katalogi dla PHP Name: php-dirs -Version: 1.7 +Version: 1.8 Release: 1 License: GPL Group: Base diff --git a/php-session.sh b/php-session.sh index 474c299..06fac33 100755 --- a/php-session.sh +++ b/php-session.sh @@ -23,7 +23,7 @@ cleanup_dir() { find_gc_time() { gc_time=0 local gc php - for php in php php4 php52 php53 php54 php55 php56 php70 php71 php72; do + for php in php $(cd /usr/bin && ls -1 php[0-9]* 2> /dev/null); do gc= if [ -x /usr/bin/$php ]; then gc=$($php -r 'echo max(round(ini_get("session.gc_maxlifetime")/3600), 1);' 2> /dev/null) -- 2.43.0