From ed78924d0023db63541bfe55e5ecb7136f1d720d Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sat, 13 Apr 2024 13:58:43 +0200 Subject: [PATCH] Update dockerrun.sh --- dockerrun.sh | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/dockerrun.sh b/dockerrun.sh index a77c174..21873af 100644 --- a/dockerrun.sh +++ b/dockerrun.sh @@ -1,28 +1,12 @@ #!/bin/bash -if [ ! -f /config/shadow ]; then - echo "Copying current shadow file to config path." - cp /etc/shadow /config/ -fi -echo "Remapping shadow file" -rm -rf /etc/shadow -ln -s /config/shadow /etc/shadow - -if [ ! -f /config/passwd ]; then - echo "Copying current passwd file to config path." - cp /etc/passwd /config/ -fi -echo "Remapping passwd file" -rm -rf /etc/passwd -ln -s /config/passwd /etc/passwd - -if [ ! -d /config/home ]; then +if [ ! -d /config/code ]; then echo "Copying current home directory to config path." - cp -r /etc/home /config/ + cp -r /home/code /config/ fi echo "Remapping home directory" -rm -rf /etc/home -ln -s /config/home /etc/home +rm -rf /home/code +ln -s /config/home/code /home/code if [ ! -d /config/ssh ]; then echo "Copying current ssh directory to config path."