From ca16530bc6bf4d4a014a0d7925f7e8fdb3225022 Mon Sep 17 00:00:00 2001 From: USER Date: Tue, 17 Jun 2025 17:11:58 +0100 Subject: [PATCH] . --- sbin/GitPull | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sbin/GitPull b/sbin/GitPull index 05cb74a..152edd3 100755 --- a/sbin/GitPull +++ b/sbin/GitPull @@ -1,6 +1,18 @@ #!/bin/sh # echo "SCRIPT $0 starting" +EUID=`id -u` + +if [ -t 1 ] +then + echo "interactive mode" + # echo ${EUID} > /var/tmp/bbb + RUNNING_CRON=1 +else + touch /var/tmp/aaa + # echo ${EUID} > /var/tmp/aaa + RUNNING_CRON=0 +fi MYNAME=`uname -n` @@ -16,16 +28,16 @@ pull_repo () { done } -# if [ $USER = root ] -# then +if [ ${EUID} = 0 ] +then ZZ=/zz/* pull_repo -# else +else ZZ=~/git/private/z* pull_repo ZZ=~/git/public/z* pull_repo -# fi +fi exit 0