Update dockerrun.sh
This commit is contained in:
parent
1753b1f66a
commit
ed78924d00
24
dockerrun.sh
24
dockerrun.sh
@ -1,28 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ ! -f /config/shadow ]; then
|
if [ ! -d /config/code ]; 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
|
|
||||||
echo "Copying current home directory to config path."
|
echo "Copying current home directory to config path."
|
||||||
cp -r /etc/home /config/
|
cp -r /home/code /config/
|
||||||
fi
|
fi
|
||||||
echo "Remapping home directory"
|
echo "Remapping home directory"
|
||||||
rm -rf /etc/home
|
rm -rf /home/code
|
||||||
ln -s /config/home /etc/home
|
ln -s /config/home/code /home/code
|
||||||
|
|
||||||
if [ ! -d /config/ssh ]; then
|
if [ ! -d /config/ssh ]; then
|
||||||
echo "Copying current ssh directory to config path."
|
echo "Copying current ssh directory to config path."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user