File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ set -euxo pipefail
44
55cd " $( dirname " $( realpath " $0 " ) " ) "
66
7- [ -z ${XDG_RUNTIME_DIR+x} ] && export XDG_RUNTIME_DIR= /tmp
7+ export RUNTIME_DIR= ${XDG_RUNTIME_DIR:- / tmp}
88
9- [ -f " $XDG_RUNTIME_DIR /openssh-rs/sshd_started" ] && exit
9+ [ -f " $RUNTIME_DIR /openssh-rs/sshd_started" ] && exit
1010
1111# Start the container
1212export PUBLIC_KEY=' ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzHvK2pKtSlZXP9tPYOOBb/xn0IiC9iLMS355AYUPC7'
@@ -25,12 +25,12 @@ docker run \
2525export HOSTNAME=127.0.0.1
2626chmod 600 .test-key
2727
28- mkdir -p " $XDG_RUNTIME_DIR /openssh-rs/"
28+ mkdir -p " $RUNTIME_DIR /openssh-rs/"
2929
3030echo Waiting for sshd to be up
31- while ! ssh -i .test-key -v -p 2222 -l test-user $HOSTNAME -o StrictHostKeyChecking=no -o UserKnownHostsFile=" $XDG_RUNTIME_DIR /openssh-rs/known_hosts" whoami; do
31+ while ! ssh -i .test-key -v -p 2222 -l test-user $HOSTNAME -o StrictHostKeyChecking=no -o UserKnownHostsFile=" $RUNTIME_DIR /openssh-rs/known_hosts" whoami; do
3232 sleep 3
3333done
3434
3535# Create sshd_started in runtime directory so that it is auto removed on restart.
36- touch " $XDG_RUNTIME_DIR /openssh-rs/sshd_started"
36+ touch " $RUNTIME_DIR /openssh-rs/sshd_started"
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ set -euxo pipefail
44
55cd " $( dirname " $( realpath " $0 " ) " ) "
66
7- [ -z ${XDG_RUNTIME_DIR+x} ] && export XDG_RUNTIME_DIR= /tmp
7+ export RUNTIME_DIR= ${XDG_RUNTIME_DIR:- / tmp}
88
9- rm " $XDG_RUNTIME_DIR /openssh-rs/sshd_started"
10- rm " $XDG_RUNTIME_DIR /openssh-rs/known_hosts"
9+ rm " $RUNTIME_DIR /openssh-rs/sshd_started"
10+ rm " $RUNTIME_DIR /openssh-rs/known_hosts"
1111
1212docker stop openssh
You can’t perform that action at this time.
0 commit comments