Update dockerrun.sh
This commit is contained in:
parent
36f64fa1b0
commit
98f09823d5
38
dockerrun.sh
38
dockerrun.sh
@ -1,2 +1,40 @@
|
||||
#!/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/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
|
||||
echo "Copying current home directory to config path."
|
||||
cp -r /etc/home /config/
|
||||
fi
|
||||
|
||||
echo "Remapping ssh directory"
|
||||
rm -rf /etc/home
|
||||
ln -s /config/home /etc/home
|
||||
|
||||
|
||||
/usr/sbin/sshd -D
|
||||
Loading…
x
Reference in New Issue
Block a user