2020-08-11 14:14:34 +00:00
|
|
|
run_remote() {
|
2020-08-21 14:33:56 +00:00
|
|
|
requestedcmd="'$*'"
|
2020-08-21 14:35:28 +00:00
|
|
|
echo
|
|
|
|
echo '---------------------------------------------------------------------------'
|
2020-08-21 20:39:37 +00:00
|
|
|
echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/
|
2020-08-11 14:14:34 +00:00
|
|
|
cd $(mktemp -d)
|
2020-08-21 21:07:02 +00:00
|
|
|
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
|
2020-08-11 14:14:34 +00:00
|
|
|
chmod +x $1
|
|
|
|
cmd=$1
|
|
|
|
if [ -x /usr/bin/chcon ]; then
|
|
|
|
chcon system_u:object_r:bin_t:s0 $cmd
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
./$cmd $*
|
2020-08-21 14:33:56 +00:00
|
|
|
echo "$requestedcmd exited with code $?"
|
2020-08-11 14:14:34 +00:00
|
|
|
cd -
|
|
|
|
}
|
|
|
|
|
|
|
|
run_remote_python() {
|
2020-08-21 21:03:12 +00:00
|
|
|
echo
|
|
|
|
echo '---------------------------------------------------------------------------'
|
|
|
|
echo Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/
|
2020-08-11 14:14:34 +00:00
|
|
|
cd $(mktemp -d)
|
2020-08-21 21:07:02 +00:00
|
|
|
curl -f -sS https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
|
2020-08-11 14:14:34 +00:00
|
|
|
/usr/libexec/platform-python $*
|
2020-08-20 20:20:02 +00:00
|
|
|
echo "'$*' exited with code $?"
|
2020-08-11 14:14:34 +00:00
|
|
|
cd -
|
|
|
|
}
|