2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-28 20:39:40 +00:00
confluent/confluent_osdeploy/el7/profiles/default/scripts/functions
Jarrod Johnson 18f4c76730 Fix end code for run_remote
Output was missing due to shift. Save cmdline before
shifting and use it on way out.
2020-08-21 10:33:56 -04:00

25 lines
705 B
Plaintext

run_remote() {
requestedcmd="'$*'"
echo Running $requestedcmd from https://$mgr/confluent-public/os/$profile/scripts/"
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
chmod +x $1
cmd=$1
if [ -x /usr/bin/chcon ]; then
chcon system_u:object_r:bin_t:s0 $cmd
fi
shift
./$cmd $*
echo "$requestedcmd exited with code $?"
cd -
}
run_remote_python() {
echo -n Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/
cd $(mktemp -d)
curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1
/usr/libexec/platform-python $*
echo "'$*' exited with code $?"
cd -
}