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

View File

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

View File

@ -1,16 +1,116 @@
#!/bin/bash #!/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 # if yes > yes update
apt install iptables -y 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 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 ### User managment
printf "+ creating group and user for proxy \n" printf "+ creating group and user for proxy \n"
@ -28,15 +128,4 @@ cp data/velocity*.jar start.sh /opt/velocity/
mkdir /opt/velocity/plugins mkdir /opt/velocity/plugins
cp data/velocity.toml /opt/velocity/ cp data/velocity.toml data/forwarding.secret data/start.sh data/server-icon.png $baseInstallLocation
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/

View File

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