From 68205edf751ec55c3e95afe37f7ae688970dfb67 Mon Sep 17 00:00:00 2001 From: godot Date: Thu, 8 Aug 2024 14:56:20 +0200 Subject: [PATCH] basic shaping --- req.md | 20 ++++++++++++++++++++ script.sh | 20 ++++++++++---------- 2 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 req.md diff --git a/req.md b/req.md new file mode 100644 index 0000000..47b8d68 --- /dev/null +++ b/req.md @@ -0,0 +1,20 @@ +update, stop service, + +- Depandencies install (+ iptables for firewall) + +- Firewall + - nonTailscale block "foo: [Tail/own/none]" + - own ssh range + +- Creating files + users + +- cp of mods and base + - for Forge + - for WhiteListing + - for Skins + +- chown to velocity + +- systemD (version chack???) + +- Tailscale install diff --git a/script.sh b/script.sh index 455d4af..6abc8a6 100755 --- a/script.sh +++ b/script.sh @@ -68,14 +68,14 @@ useradd --system --shell /usr/sbin/nologin --home /opt/velocity -g velocity velo printf "+ creating file structure in /opt/velocity/ \n" mkdir /opt/velocity -mv data/velocity*.jar start.sh /opt/velocity/ +cp data/velocity*.jar start.sh /opt/velocity/ mkdir /opt/velocity/plugins -mv data/velocity.toml /opt/velocity/ -mv data/forwarding.secret /opt/velocity/ -mv data/start.sh /opt/velocity/ -mv data/server-icon.png /opt/velocity/ +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 @@ -86,7 +86,7 @@ chown -R velocity:velocity /opt/velocity/ ### SystemD service printf "+ Preparign systemD service\n" -mv data/mc-velocity.service /etc/systemd/system/ +cp data/mc-velocity.service /etc/systemd/system/ systemctl daemon-reload @@ -163,7 +163,7 @@ read ansForge if [[ "$ansForge" =~ ("Y"|"y") || -z $ansForge ]]; then printf "+ adding reqired plugin \n" - mv data/Ambassador*.jar /opt/velocity/plugins + cp data/Ambassador*.jar /opt/velocity/plugins fi printf "Do you want to run it with whitelist plugin? [Y/n]: \n" @@ -171,9 +171,9 @@ read ansWhite if [[ "$ansWhite" =~ ("Y"|"y") || -z $ansWhite ]]; then printf "+ adding reqired plugin \n" - mv data/ReWhitelist*.jar /opt/velocity/plugins + cp data/ReWhitelist*.jar /opt/velocity/plugins mkdir /opt/velocity/whitelists - mv data/whitelists/* /opt/velocity/whitelists/ + cp data/whitelists/* /opt/velocity/whitelists/ fi printf "Do you want to run it with SkinRestorer? [Y/n]: \n" @@ -181,7 +181,7 @@ read ansSkin if [[ "$ansSkin" =~ ("Y"|"y") || -z $ansSkin ]]; then printf "+ adding reqired plugin \n" - mv data/SkinsRestorer.jar /opt/velocity/plugins + cp data/SkinsRestorer.jar /opt/velocity/plugins fi ### Start service