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
4
4
5
5
cd " $( dirname " $( realpath " $0 " ) " ) "
6
6
7
- [ -z ${XDG_RUNTIME_DIR+x} ] && export XDG_RUNTIME_DIR= /tmp
7
+ export RUNTIME_DIR= ${XDG_RUNTIME_DIR:- / tmp}
8
8
9
- [ -f " $XDG_RUNTIME_DIR /openssh-rs/sshd_started" ] && exit
9
+ [ -f " $RUNTIME_DIR /openssh-rs/sshd_started" ] && exit
10
10
11
11
# Start the container
12
12
export PUBLIC_KEY=' ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzHvK2pKtSlZXP9tPYOOBb/xn0IiC9iLMS355AYUPC7'
@@ -25,12 +25,12 @@ docker run \
25
25
export HOSTNAME=127.0.0.1
26
26
chmod 600 .test-key
27
27
28
- mkdir -p " $XDG_RUNTIME_DIR /openssh-rs/"
28
+ mkdir -p " $RUNTIME_DIR /openssh-rs/"
29
29
30
30
echo 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
32
32
sleep 3
33
33
done
34
34
35
35
# 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
4
4
5
5
cd " $( dirname " $( realpath " $0 " ) " ) "
6
6
7
- [ -z ${XDG_RUNTIME_DIR+x} ] && export XDG_RUNTIME_DIR= /tmp
7
+ export RUNTIME_DIR= ${XDG_RUNTIME_DIR:- / tmp}
8
8
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"
11
11
12
12
docker stop openssh
You can’t perform that action at this time.
0 commit comments