21 lines
476 B
Bash
21 lines
476 B
Bash
#!/bin/bash
|
|
|
|
if [ ! -d /config/code ]; then
|
|
echo "Copying current home directory to config path."
|
|
cp -r /home/code /config/
|
|
chown code:root /config/code
|
|
fi
|
|
echo "Remapping home directory"
|
|
rm -rf /home/code
|
|
ln -s /config/code /home/code
|
|
|
|
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"
|
|
/usr/sbin/sshd -D |