systemD service
This commit is contained in:
parent
3db62e5346
commit
f19452ddd3
@ -9,16 +9,16 @@
|
||||
- [*] Firewall shinanigns
|
||||
- [*] Proxmox admin acces in firewall
|
||||
- [x] Auto add plugins
|
||||
- [*] SystemD service
|
||||
- [ ] Config of velocity.toml
|
||||
- [ ] IP
|
||||
- [*] Tailscale
|
||||
- [ ] Comments of what is doing what
|
||||
- [ ] Tailscale
|
||||
- [ ] SystemD service
|
||||
|
||||
## To learn
|
||||
- [x] What content of start.sh means
|
||||
- [ ] Requred resources
|
||||
- [ ] Different types of forwarding
|
||||
- [ ] SkinRestorer???
|
||||
- [ ] DinMap
|
||||
- [ ] Requred resources
|
||||
- [ ] In their docs they have Configuration pages
|
||||
- [ ] In their docs they have pages
|
||||
|
||||
31
data/mc-velocity.service
Normal file
31
data/mc-velocity.service
Normal file
@ -0,0 +1,31 @@
|
||||
[Unit]
|
||||
Description=Proxy for Minecraft server
|
||||
After=network.target
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecReload=/usr/bin/screen -S velocity -X stuff \"reload^M\"
|
||||
|
||||
ExecStart=/usr/bin/screen -DmS velocity ./start.sh
|
||||
|
||||
ExecStop=/usr/bin/screen -p 0 -S velocity -X eval 'stuff "end"\\015'
|
||||
ExecStop=/bin/sh -c '/bin/sleep 10'
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=60s
|
||||
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectSystem=full
|
||||
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
|
||||
User=velocity
|
||||
Group=velocity
|
||||
|
||||
WorkingDirectory=/opt/velocity/
|
||||
21
script.sh
21
script.sh
@ -134,6 +134,27 @@ if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z "$ansFirewallSetup" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
### tailsclae install ###
|
||||
|
||||
printf "Do you want to install Tailscale now? [Y/n]: \n"
|
||||
read ansTail
|
||||
|
||||
if [[ "$ansTail" =~ ("y"|"Y") || -z $ansTail ]]; then
|
||||
|
||||
curl -fsSL https://tailscale.com/install.sh | sh
|
||||
|
||||
|
||||
if [[ "$sshBlockRange" =~ ("y"|"Y") || -z $sshBlockRange ]]; then
|
||||
tailscale up --ssh
|
||||
|
||||
else
|
||||
tailscale up
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
### Start service ### needs update
|
||||
|
||||
printf "Do you want to start server right now? [Y/n]: \n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user