This commit is contained in:
Eliezer Croitoru 2021-07-18 23:45:03 +03:00
parent efa3ad7b9d
commit 5eb0cc7d72
2 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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