working on modul base

This commit is contained in:
godot 2024-08-09 16:05:57 +02:00
parent 0e6197186e
commit 4925373994
4 changed files with 136 additions and 42 deletions

View File

@ -15,17 +15,21 @@
## Modularity
- [ ] Break into separate files
- [ ] Firewall update
- [ ] My players
+ [ ] install iptables
- [ ] Whitelists - My players
- [ ] Base update
- [ ] Mods update
- [ ] Service update
- [ ] Tailscale update
- [ ] Test owner of master script (source/run .)
- [ ] Version control
- [ ] Error handelign
- [ ] Permisons handeling
- [ ] Put on chrono job (git pull + run install.sh)
## Eye candy
- [ ] Comments
- [ ] Disable bunch of text
## Nice
- [ ] do NOT store everything in repo

View File

@ -1,11 +1,16 @@
#!/bin/bash
# Stop systemD service
#
# apt update
# Git pull
#stop service
systemctl stop mc-forge
#update system
apt update
#
# Differencies betwen install.cfg a install-old.cfg > found what work needs to be done
#
# If uninstall check for verification
#
# depandencies install
# files
@ -23,8 +28,6 @@
#
# chown velocity:velocity
#
# + all to rm
#
printf "\n Everythink is now set up. It is good idea to check these:"
printf "\n systemctl status mc-velocity"

View File

@ -1,16 +1,116 @@
#!/bin/bash
### --- Dependencies --- ###
# If no > yes install
if [[ "$oDependenciesInstalled"="no" && "$dependenciesInstalled"="yes"]]; then
printf "+ Installing depandencies \n"
apt install openjdk-17-jre-headless screen
printf "+ Installing depandencies \n"
# if yes > no uninstall
if [[ "$oDependenciesInstalled"="yes" && "$dependenciesInstalled"="no"]]; then
apt install openjdk-17-jre-headless screen
printf "+ UNinstalling depandencies \n"
apt remove openjdk-17-jre-headless screen
if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then
apt install iptables -y
# if yes > yes update
if [[ "$oDependenciesInstalled"="yes" && "$dependenciesInstalled"="yes"]]; then
printf "+ skiping dependencies check \n"
# if no > no restr
if [[ "$oDependenciesInstalled"="no" && "$dependenciesInstalled"="no"]]; then
pritf "+ skiping installation of dependencies \n"
else
#error handeling
fi
### --- User managment --- ###
# If no > yes install
if [[ "$oDependenciesInstalled"="no" && "$dependenciesInstalled"="yes"]]; then
printf "+ Installing depandencies \n"
apt install openjdk-17-jre-headless screen
# if yes > no uninstall
if [[ "$oDependenciesInstalled"="yes" && "$dependenciesInstalled"="no"]]; then
printf "+ UNinstalling depandencies \n"
apt remove openjdk-17-jre-headless screen
# if yes > yes update
if [[ "$oDependenciesInstalled"="yes" && "$dependenciesInstalled"="yes"]]; then
printf "+ skiping dependencies check \n"
# if no > no restr
if [[ "$oDependenciesInstalled"="no" && "$dependenciesInstalled"="no"]]; then
pritf "+ skiping installation of dependencies \n"
else
#error handeling
fi
### --- File Structure --- ###
# If no > yes install
if [[ "$oDependenciesInstalled"="no" && "$dependenciesInstalled"="yes"]]; then
printf "+ Installing depandencies \n"
apt install openjdk-17-jre-headless screen
# if yes > no uninstall
if [[ "$oDependenciesInstalled"="yes" && "$dependenciesInstalled"="no"]]; then
printf "+ UNinstalling depandencies \n"
apt remove openjdk-17-jre-headless screen
# if yes > yes update
if [[ "$oDependenciesInstalled"="yes" && "$dependenciesInstalled"="yes"]]; then
printf "+ skiping dependencies check \n"
# if no > no restr
if [[ "$oDependenciesInstalled"="no" && "$dependenciesInstalled"="no"]]; then
pritf "+ skiping installation of dependencies \n"
else
#error handeling
fi
#
#
#
#
#
#
### User managment
printf "+ creating group and user for proxy \n"
@ -28,15 +128,4 @@ cp data/velocity*.jar start.sh /opt/velocity/
mkdir /opt/velocity/plugins
cp data/velocity.toml /opt/velocity/
cp data/forwarding.secret /opt/velocity/
cp data/start.sh /opt/velocity/
cp data/server-icon.png /opt/velocity/
### Permisions
printf "+ handeling permisions \n"
chown -R velocity:velocity /opt/velocity/
cp data/velocity.toml data/forwarding.secret data/start.sh data/server-icon.png $baseInstallLocation

View File

@ -1,25 +1,23 @@
# Base informations
lastUpdateDate= #to version control
baseInstallLocation=no
baseUserName=no
dependenciesInstalled=no #if set to no will do it
systemdService=no #if y > update, n > not
autoUpgrade=no #work in progress
### ------------ Do not change these stats, it states what job was done on this system --- ###
# Base informationsOOUpdateDate= #to version control
oBaseInstallLocation=no
oBaseUserName=no
oDependenciesInstalled=no #if set to no will do it
oSystemdService=no #if y > update, n > not
oautoUpgrade=no #work in progress
# Firewall
iptables=no #to check if installed + install
tailscale=no #to check if installed + install
sshRange=no # Ip range
oiptables=no #to check if installed + install
otailscale=no #to check if installed + install
osshRange=no # Ip range
# Mods
Ambassador=no #Forge support
ReWhitelist=no #Whitelist support
SkinResolver=no #Skins with offline mode
oAmbassador=no #Forge support
oReWhitelist=no #Whitelist support
oSkinResolver=no #Skins with offline mode
# Proxiing information
forwarding=no # modern/legacy #how to not set duble velocity.toml
forwardingSecret=no
oforwarding=no # modern/legacy #how to not set duble velocity.toml
oforwardingSecret=no