diff --git a/collect-clish-scripts.sh b/collect-clish-scripts.sh index 272d38b..f10ff8d 100755 --- a/collect-clish-scripts.sh +++ b/collect-clish-scripts.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +export CPDIR=/opt/fw1 +export FWDIR=${CPDIR} +export SUROOT=/var/suroot +. /pfrm2.0/etc/bashrc + if [ "$( pt users -f username $USER -F role | head -n 1 | grep -v {} )" != "ROLE.SUPER" ];then echo "This script can only run from a user with ROLE.SUPER ie super user" exit 1 diff --git a/cron-example-with-diff-dstdom.sh b/cron-example-with-diff-dstdom.sh index 55b9aac..347ddac 100755 --- a/cron-example-with-diff-dstdom.sh +++ b/cron-example-with-diff-dstdom.sh @@ -1,10 +1,5 @@ #!/usr/bin/env bash -if [ "$( pt users -f username $USER -F role | head -n 1 | grep -v {} )" != "ROLE.SUPER" ];then - echo "This script can only run from a user with ROLE.SUPER ie super user" - exit 1 -fi - FLAGS_PREFIX="/tmp/dst-dom-script-flag_" WORK_DIR="/tmp/dst-dom-script" @@ -16,6 +11,12 @@ export FWDIR=${CPDIR} export SUROOT=/var/suroot . /pfrm2.0/etc/bashrc +if [ "$( pt users -f username $USER -F role | head -n 1 | grep -v {} )" != "ROLE.SUPER" ];then + echo "This script can only run from a user with ROLE.SUPER ie super user" + exit 1 +fi + + if [ -f "${FLAGS_PREFIX}unsetx" ];then set -x fi