From a63db90ef03ae476d5dce0b22385862b25e906f8 Mon Sep 17 00:00:00 2001 From: ggodot Date: Sun, 25 Jan 2026 15:19:59 +0100 Subject: [PATCH] playersync configuration --- README.md | 4 ++-- data/playersync-common.toml | 4 ++-- gate-install.sh | 2 ++ mc-install.sh | 12 +++++++++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3ffe163..2f381a0 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ To switch user use: # To DO - [ ] Better handeling farwarding secrets -- [ ] Configuration of playersync - [ ] server.properties sed -i - +- [ ] server.properties check +- [ ] mods check - [ ] adding users to db ## Proxmox level up diff --git a/data/playersync-common.toml b/data/playersync-common.toml index 8ecf5dc..c9b94f3 100644 --- a/data/playersync-common.toml +++ b/data/playersync-common.toml @@ -1,7 +1,7 @@ #General settings [general] #The host of the database - host = "10.0.0.42" + host = "10.0.0.5" #database port # Default: 3306 # Range: 0 ~ 65535 @@ -9,7 +9,7 @@ #whether use SSL use_ssl = false #username - user_name = "main" + user_name = "mainUser" #password password = "KurevskeHesloMain" #database name diff --git a/gate-install.sh b/gate-install.sh index aa07453..dfaa8e1 100755 --- a/gate-install.sh +++ b/gate-install.sh @@ -1,3 +1,5 @@ +#!/bin/bash + apt update apt upgrade apt install vim curl diff --git a/mc-install.sh b/mc-install.sh index 50e6d03..608c796 100755 --- a/mc-install.sh +++ b/mc-install.sh @@ -33,6 +33,14 @@ read ansSkinRestorer printf "Do you want to set up PlayerSync [Y/n]: \n" read ansPlayerSync +if [[ "$ansPlayerSync" =~ ("y"|"Y") || -z $ansPlayerSync ]]; then + printf "What username you want to use? (leave blank for default) \n" + read user_name + + printf "What password you want to use? (leave blank for default)\n" + read password +fi + sleep 2 ### Update ### @@ -162,7 +170,9 @@ if [[ "$ansPlayerSync" =~ ["y"|"Y"] || -z $ansPlayerSync ]]; then rndr=$((RANDOM % (32765-10000+1)+10000)) sed -i "s/1234567890/$rndr$rndr/g" config/playersync-common.toml #gens uniqe id - #TODO more configuration - password, user_name + sed -i "s/KurevskeHesloMain/$password/g" + sed -i "s/mainUser/$user_name/g" + fi