2020-06-18 16:36:00 +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-06-18 16:36:00 +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-06-18 16:36:00 +00:00
|
|
|
chmod +x $1
|
2020-07-15 19:22:27 +00:00
|
|
|
cmd=$1
|
2020-07-24 20:07:15 +00:00
|
|
|
if [ -x /usr/bin/chcon ]; then
|
2020-07-24 19:32:13 +00:00
|
|
|
chcon system_u:object_r:bin_t:s0 $cmd
|
|
|
|
fi
|
2020-07-15 19:22:27 +00:00
|
|
|
shift
|
2020-07-13 21:08:38 +00:00
|
|
|
./$cmd $*
|
2020-08-21 14:33:56 +00:00
|
|
|
echo "$requestedcmd exited with code $?"
|
2020-06-18 16:36:00 +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-06-18 16:36:00 +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-07-13 21:08:38 +00:00
|
|
|
/usr/libexec/platform-python $*
|
2020-08-20 20:20:02 +00:00
|
|
|
echo "'$*' exited with code $?"
|
2020-06-18 16:36:00 +00:00
|
|
|
cd -
|
|
|
|
}
|