#!/bin/sh

DIR="/var/packages/ts3server/target/teamspeak3-server_linux"
TMP="/tmp/ts3bak/"

# When upgrading, we need to backup the config files first into a temporary dir
mkdir $TMP
/bin/cp -fpR "$DIR/files/" $TMP
/bin/cp -fpR "$DIR/logs/" $TMP
/bin/cp -f "$DIR/nohup.out" $TMP
/bin/cp -f "$DIR/ts3server.sqlitedb" $TMP
/bin/cp -f "$DIR/query_ip_blacklist.txt" $TMP
/bin/cp -f "$DIR/query_ip_whitelist.txt" $TMP
/bin/cp -f "$DIR/ts3server.ini" $TMP
/bin/cp -f "$DIR/ts3db_mysql.ini" $TMP
/bin/cp -f "$DIR/licensekey.dat" $TMP

exit 0
