Configurations and other related files for Starlight Network infrastructure, made openly available.

Compare changes

Choose any two refs to compare.

-109
-15
TCProxy/TCProxy@.service
··· 1 - [Unit] 2 - Description=TCProxy (%i) 3 - After=network.target 4 - StartLimitIntervalSec=0 5 - 6 - [Service] 7 - Type=simple 8 - Restart=always 9 - RestartSec=1 10 - User=alexia 11 - ExecStart=/srv/TCProxy/TCProxy 12 - WorkingDirectory=/srv/TCProxy/%i 13 - 14 - [Install] 15 - WantedBy=multi-user.target
-7
TCProxy/readme.txt
··· 1 - this is a small patch to stop logging IPs for https://github.com/AndersBallegaard/TCProxy 2 - 3 - additionally, a systemd template service, which expects config directories in /srv/TCProxy/ 4 - with the corresponding resulting service, for example TCProxy@test.service would be /srv/TCProxy/test. 5 - In there, it would look for a configuration file as per usual. 6 - 7 - The service unit expects a compiled binary in /srv/TCProxy/TCProxy.
-13
TCProxy/redact.patch
··· 1 - diff --git a/proxy.go b/proxy.go 2 - index 50b5772..cb0bfa9 100644 3 - --- a/proxy.go 4 - +++ b/proxy.go 5 - @@ -10,7 +10,7 @@ import ( 6 - func (instance *Config) handleConnection(clientConn *net.TCPConn) { 7 - defer clientConn.Close() 8 - targetTCPAddr := instance.Target.getTCPAddr() 9 - - log.Printf("Serving %s to %s\n", clientConn.RemoteAddr().String(), targetTCPAddr) 10 - + log.Printf("Serving [REDACTED] to [REDACTED]") 11 - 12 - targetConn, err := net.DialTCP("tcp", nil, targetTCPAddr) 13 - checkErrFatal(err)
-10
minecraft/minecraft-restart.service
··· 1 - [Unit] 2 - Description=Restart Minecraft.service 3 - 4 - [Service] 5 - ExecStart=/usr/bin/fish /srv/safeMinecraftRestart.fish 6 - # ExecStart=/usr/bin/podman restart minecraft_mc_1 7 - Type=oneshot 8 - 9 - [Install] 10 - WantedBy=default.target
-9
minecraft/minecraft-restart.timer
··· 1 - [Unit] 2 - Description=Minecraft restart timer 3 - 4 - [Timer] 5 - OnCalendar=*-*-* 4:00:00 Europe/Berlin 6 - Persistent=true 7 - 8 - [Install] 9 - WantedBy=timers.target
-1
minecraft/readme.txt
··· 1 - service and timer files that we use to auto-restart the server every night at 4 AM.
-10
systemd-wait.fish/README.md
··· 1 - # systemd-wait.fish 2 - 3 - A small script that checks whether or not an HTTP(s) endpoint is 4 - reachable before starting a list of services. 5 - 6 - Please read the script, it isn't very long and but it is configured 7 - directly in the script. 8 - 9 - There is a sample systemd unit to run this script, but note that this 10 - is best paired with your own setup for (re)starting services.
-38
systemd-wait.fish/systemd-wait.fish
··· 1 - #!/usr/bin/env fish 2 - 3 - # systemd-wait.fish 4 - # a small script using `curl` that lets you wait until certain endpoints return 5 - # certain HTTP responses before starting services 6 - 7 - # CONFIG: 8 - set services drasl headscale headplane 9 - # you must add your own endpoint to `curl` like so: 10 - set endpoint "https://auth.starlightnet.work/application/o/headplane/.well-known/openid-configuration" 11 - 12 - # set initial value to false 13 - set -g serviceReachable false 14 - 15 - function checkEndpoint 16 - if test (curl -o /dev/null -s -w "%{http_code}" "$endpoint") = "200" 17 - echo "HTTP 200, Service is reachable" 18 - set -g serviceReachable true 19 - return 0 20 - else 21 - echo "service is not yet reachable." 22 - set -g serviceReachable false 23 - echo "waiting 5 more seconds..." 24 - sleep 5s 25 - return 1 26 - end 27 - end 28 - 29 - while test $serviceReachable = "false" 30 - checkEndpoint 31 - end 32 - 33 - echo $serviceReachable 34 - 35 - if test $serviceReachable = "true" 36 - echo "Starting services: $services" 37 - systemctl start $services 38 - end
-6
systemd-wait.fish/systemd-wait.service
··· 1 - [Unit] 2 - Description=systemd-wait.fish - wait for an endpoint to return before starting services 3 - 4 - [Service] 5 - Type=oneshot 6 - ExecStart=/usr/local/bin/systemd-wait.fish