s/whoami/id -un/
This commit is contained in:
parent
ec38dba209
commit
6560b0e2cc
|
@ -40,10 +40,10 @@ echo --- Remove unused docker networks
|
||||||
docker network prune -f
|
docker network prune -f
|
||||||
)
|
)
|
||||||
|
|
||||||
echo "--- Delete /tmp files older than 1 day owned by $(whoami)"
|
echo "--- Delete /tmp files older than 1 day owned by $(id -un)"
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
find /tmp -maxdepth 1 -user "$(whoami)" -mtime +1 -print0 | xargs -0 rm -rf
|
find /tmp -maxdepth 1 -user "$(id -un)" -mtime +1 -print0 | xargs -0 rm -rf
|
||||||
)
|
)
|
||||||
|
|
||||||
echo --- Deleting stale buildkite agent build directories
|
echo --- Deleting stale buildkite agent build directories
|
||||||
|
|
|
@ -6,7 +6,7 @@ source "$here"/../scripts/gcloud.sh
|
||||||
# shellcheck source=net/common.sh
|
# shellcheck source=net/common.sh
|
||||||
source "$here"/common.sh
|
source "$here"/common.sh
|
||||||
|
|
||||||
prefix=testnet-dev-$(whoami | sed -e s/[^a-z0-9].*//)
|
prefix=testnet-dev-$(id -un | sed -e s/[^a-z0-9].*//)
|
||||||
validatorNodeCount=5
|
validatorNodeCount=5
|
||||||
clientNodeCount=1
|
clientNodeCount=1
|
||||||
leaderMachineType=n1-standard-16
|
leaderMachineType=n1-standard-16
|
||||||
|
|
|
@ -205,7 +205,7 @@ gcloud_FigureRemoteUsername() {
|
||||||
# instance is reported as RUNNING and when it's reachable over the network
|
# instance is reported as RUNNING and when it's reachable over the network
|
||||||
timeout 30s bash -c "set -o pipefail; until ping -c 3 $publicIp | tr - _; do echo .; done"
|
timeout 30s bash -c "set -o pipefail; until ping -c 3 $publicIp | tr - _; do echo .; done"
|
||||||
|
|
||||||
gcloud compute ssh "$name" --zone "$zone" -- "echo whoami \$(whoami)" | tee whoami
|
gcloud compute ssh "$name" --zone "$zone" -- "echo whoami \$(id -un)" | tee whoami
|
||||||
)
|
)
|
||||||
|
|
||||||
[[ "$(tr -dc '[:print:]' < whoami; rm -f whoami)" =~ ^whoami\ (.*)$ ]] || {
|
[[ "$(tr -dc '[:print:]' < whoami; rm -f whoami)" =~ ^whoami\ (.*)$ ]] || {
|
||||||
|
|
Loading…
Reference in New Issue