Skip to content

Commit

Permalink
Read docs/CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Krätzig committed May 20, 2021
1 parent c58115d commit 0acff91
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
25 changes: 6 additions & 19 deletions TS3UpdateScript
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ exec 5<&0
# Donations: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ZRXLSC2UBVWE
#

SCRIPT_VERSION="5.8.2"
LAST_EDIT_DATE="2021-04-07"
SCRIPT_VERSION="5.8.3"
LAST_EDIT_DATE="2021-05-20"

# DO NOT REMOVE OR CHANGE
SOFTWARE_ABOUT="This is the most widely used and fastest shell script to update all your TeamSpeak 3 server instances."
Expand Down Expand Up @@ -87,7 +87,7 @@ function clearTerminalScreen() {
# Return: 0:boolean or 1:boolean
function checkConsistency() {
CHKSUM=$(grep -v "ORIGIN=" "$0" | sha256sum | cut -d " " -f 1)
ORIGIN="ba8ba471627a26bde26f8e6c680574deda66c7c10bf617211e0e752f424f5c0a"
ORIGIN="b5fd2210cd8ca75b8671760db176230437828732ed004e54640e10a01e9174c6"

if [[ "$CHKSUM" == "$ORIGIN" ]]; then
return 0;
Expand Down Expand Up @@ -949,7 +949,7 @@ function getGroupOfTS3ServerFiles() {
# Par 1: TS3ServerRootDirectory:string
# Return: GroupID:string or 1:boolean
function getGroupID() {
GROUP_ID=$(grep -E "^$(getGroupOfTS3ServerFiles ${1})\:" /etc/passwd | cut -d ":" -f 4)
GROUP_ID=$(grep -E "^$(getGroupOfTS3ServerFiles ${1})\:" /etc/group | cut -d ":" -f 3)

if [[ -n "$GROUP_ID" ]]; then
echo -n "$GROUP_ID";
Expand Down Expand Up @@ -1012,19 +1012,6 @@ function getDatabaseINIFile() {
fi
}

# Get database type
# Par 1: TeamSpeakRootDirectory:string
# Return: DatabaseType:string or 1:boolean
function getDatabaseType() {
DATABASE_TYPE="$(grep -Eo 'dbPlugin name:.*plugin' $(find ${1}/logs/ -name 'ts3server*_0.log' 2> /dev/null | sort | tail -1) | tr -d " " | cut -d ":" -f 2 | grep -Eo 'SQLite|MySQL|MariaDB')"

if [[ -n "$DATABASE_TYPE" ]]; then
echo -n "$DATABASE_TYPE";
else
return 1;
fi
}

# Get TS3 server instance log path
# Par 1: TS3ServerRootDirectory:string
# Return: InstanceLogPath:string or 1:boolean
Expand Down Expand Up @@ -1058,7 +1045,7 @@ function getTS3ServerInstanceLogPath() {
# Return: DatabaseType:string or 1:boolean
function getDatabaseType() {
INSTANCE_LOG_PATH="$(getTS3ServerInstanceLogPath ${1})"
DATABASE_TYPE="$(grep -Eo 'dbPlugin name:.*plugin' $(find ${INSTANCE_LOG_PATH} -name 'ts3server*_0.log' 2> /dev/null | sort | tail -1) | tr -d " " | cut -d ":" -f 2 | grep -Eo 'SQLite|MySQL|MariaDB')"
DATABASE_TYPE="$(grep -Eo 'dbPlugin name:.*plugin' $(find ${INSTANCE_LOG_PATH} -name 'ts3server*_0.log' 2> /dev/null | sort | tail -1) | tail -1 | tr -d " " | cut -d ":" -f 2 | grep -Eo 'SQLite|MySQL|MariaDB')"

if [[ -n "$DATABASE_TYPE" ]]; then
echo -n "$DATABASE_TYPE";
Expand Down Expand Up @@ -2219,7 +2206,7 @@ function createDebugReport() {
function main() {
# Load text for set language
cd "$ABSOLUTE_PATH"
source $PAR_LOCALE;
source "${ABSOLUTE_PATH}/$PAR_LOCALE";
cd - > /dev/null

# Enable debugging by commenting out the following line
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Hotfix | Important fix for one more issues, which causes a not (correct) working

## Releases

### Version 5.8.3 (2021-05-20)

* Fixed incorrect group ownership ID detection
* Fixed database type detection when using `appendlog=1`
* Fixed incorrect loading of language file, when executing the TS3UpdateScript as global command (from eg. `/usr/local/bin/`)

### Version 5.8.2 (2021-04-07)

* Changed relative to absolute path for installing the scripts bash completion
Expand Down

0 comments on commit 0acff91

Please sign in to comment.