systemD service
This commit is contained in:
parent
3db62e5346
commit
f19452ddd3
@ -9,16 +9,16 @@
|
|||||||
- [*] Firewall shinanigns
|
- [*] Firewall shinanigns
|
||||||
- [*] Proxmox admin acces in firewall
|
- [*] Proxmox admin acces in firewall
|
||||||
- [x] Auto add plugins
|
- [x] Auto add plugins
|
||||||
|
- [*] SystemD service
|
||||||
- [ ] Config of velocity.toml
|
- [ ] Config of velocity.toml
|
||||||
- [ ] IP
|
- [ ] IP
|
||||||
|
- [*] Tailscale
|
||||||
- [ ] Comments of what is doing what
|
- [ ] Comments of what is doing what
|
||||||
- [ ] Tailscale
|
|
||||||
- [ ] SystemD service
|
|
||||||
|
|
||||||
## To learn
|
## To learn
|
||||||
- [x] What content of start.sh means
|
- [x] What content of start.sh means
|
||||||
|
- [ ] Requred resources
|
||||||
- [ ] Different types of forwarding
|
- [ ] Different types of forwarding
|
||||||
- [ ] SkinRestorer???
|
- [ ] SkinRestorer???
|
||||||
- [ ] DinMap
|
- [ ] DinMap
|
||||||
- [ ] Requred resources
|
- [ ] In their docs they have pages
|
||||||
- [ ] In their docs they have Configuration 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
|
||||||
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
|
### Start service ### needs update
|
||||||
|
|
||||||
printf "Do you want to start server right now? [Y/n]: \n"
|
printf "Do you want to start server right now? [Y/n]: \n"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user