mirror of
https://github.com/luzifer-docker/teamspeak3.git
synced 2024-12-20 14:41:17 +00:00
Ensure a symlink is not touched if files are already linked
This should only happen in rare cases but might happen when the container is stopped and started again. Thanks @combro2k for the hint.
This commit is contained in:
parent
f538c89614
commit
ac5b63f113
1 changed files with 5 additions and 3 deletions
|
@ -8,11 +8,13 @@ if [ -f $VOLUME/ts3server.sqlitedb ]
|
|||
echo "$VOLUME/ts3server.sqlitedb found. Creating Link between host-mounted db-file and ts3-folder."
|
||||
ln -s $VOLUME/ts3server.sqlitedb /opt/teamspeak3-server_linux-amd64/ts3server.sqlitedb
|
||||
fi
|
||||
|
||||
echo "2. Link the files-folder into the host-mounted volume."
|
||||
mkdir -p /teamspeak3/files
|
||||
rm -rf /opt/teamspeak3-server_linux-amd64/files
|
||||
ln -s /teamspeak3/files /opt/teamspeak3-server_linux-amd64/files
|
||||
|
||||
if ! [ -L /opt/teamspeak3-server_linux-amd64/files ]; then
|
||||
rm -rf /opt/teamspeak3-server_linux-amd64/files
|
||||
ln -s /teamspeak3/files /opt/teamspeak3-server_linux-amd64/files
|
||||
fi
|
||||
|
||||
echo "3. Starting TS3-Server."
|
||||
echo "Check if ts3server.ini exists in host-mounted volume."
|
||||
|
|
Loading…
Reference in a new issue