playersync configuration

This commit is contained in:
ggodot 2026-01-25 15:19:59 +01:00
parent 56333f2fde
commit a63db90ef0
4 changed files with 17 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,5 @@
#!/bin/bash
apt update
apt upgrade
apt install vim curl

View File

@ -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