From 68a1c2bb803378b27e1b19cb53be5bbd11121e2d Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 25 Jun 2014 14:04:30 +0200 Subject: [PATCH] Use sogo-tool to expire session --- root/etc/cron.hourly/sogo-sessions | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/root/etc/cron.hourly/sogo-sessions b/root/etc/cron.hourly/sogo-sessions index 7c0f46d..d88779f 100644 --- a/root/etc/cron.hourly/sogo-sessions +++ b/root/etc/cron.hourly/sogo-sessions @@ -1,7 +1,6 @@ #!/bin/bash TIME=$(/sbin/e-smith/db configuration getprop sogod SessionDuration || echo 1440) -TIME=$(($TIME*60)) # Remove old SOGo sessions entries -/usr/bin/mysql sogo -e "delete from sogo_sessions_folder where unix_timestamp(now())-c_lastseen > $TIME;" +su -l -s /bin/bash sogo -c "/usr/sbin/sogo-tool expire-sessions $TIME"