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