Update dockerrun.sh
This commit is contained in:
parent
1936dab98b
commit
a9de09d58b
22
dockerrun.sh
22
dockerrun.sh
@ -4,7 +4,6 @@ if [ ! -f /config/shadow ]; then
|
|||||||
echo "Copying current shadow file to config path."
|
echo "Copying current shadow file to config path."
|
||||||
cp /etc/shadow /config/
|
cp /etc/shadow /config/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Remapping shadow file"
|
echo "Remapping shadow file"
|
||||||
rm -rf /etc/shadow
|
rm -rf /etc/shadow
|
||||||
ln -s /config/shadow /etc/shadow
|
ln -s /config/shadow /etc/shadow
|
||||||
@ -13,28 +12,25 @@ if [ ! -f /config/passwd ]; then
|
|||||||
echo "Copying current passwd file to config path."
|
echo "Copying current passwd file to config path."
|
||||||
cp /etc/passwd /config/
|
cp /etc/passwd /config/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Remapping passwd file"
|
echo "Remapping passwd file"
|
||||||
rm -rf /etc/passwd
|
rm -rf /etc/passwd
|
||||||
ln -s /config/passwd /etc/passwd
|
ln -s /config/passwd /etc/passwd
|
||||||
|
|
||||||
if [ ! -d /config/ssh ]; then
|
|
||||||
echo "Copying current ssh directory to config path."
|
|
||||||
cp -r /etc/ssh /config/
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Remapping home directory"
|
|
||||||
rm -rf /etc/home
|
|
||||||
ln -s /config/home /etc/home
|
|
||||||
|
|
||||||
if [ ! -d /config/home ]; then
|
if [ ! -d /config/home ]; then
|
||||||
echo "Copying current home directory to config path."
|
echo "Copying current home directory to config path."
|
||||||
cp -r /etc/home /config/
|
cp -r /etc/home /config/
|
||||||
fi
|
fi
|
||||||
|
echo "Remapping home directory"
|
||||||
echo "Remapping ssh directory"
|
|
||||||
rm -rf /etc/home
|
rm -rf /etc/home
|
||||||
ln -s /config/home /etc/home
|
ln -s /config/home /etc/home
|
||||||
|
|
||||||
|
if [ ! -d /config/ssh ]; then
|
||||||
|
echo "Copying current ssh directory to config path."
|
||||||
|
cp -r /etc/ssh /config/
|
||||||
|
fi
|
||||||
|
echo "Remapping ssh directory"
|
||||||
|
rm -rf /etc/ssd
|
||||||
|
ln -s /config/ssd /etc/ssd
|
||||||
|
|
||||||
echo "Starting SSH server"
|
echo "Starting SSH server"
|
||||||
/usr/sbin/sshd -D
|
/usr/sbin/sshd -D
|
||||||
Loading…
x
Reference in New Issue
Block a user