commit dd5a398a920ea492fc9c0a9aa790007450dce04b Author: mikula Date: Wed Jun 12 19:39:21 2024 +0200 Add install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..c655c1d --- /dev/null +++ b/install.sh @@ -0,0 +1,26 @@ +apt-get install unzip -y +wget https://github.com/rapiz1/rathole/releases/download/v0.5.0/rathole-x86_64-unknown-linux-gnu.zip +unzip rathole-x86_64-unknown-linux-gnu.zip +cp rathole /usr/bin/rathole +mkdir /etc/rathole + + +cat < /etc/systemd/system/rathole.service +[Unit] +Description=Rathole Server Service +After=network.target + +[Service] +Type=simple +Restart=on-failure +RestartSec=5s +LimitNOFILE=1048576 + +# with root +ExecStart=/usr/bin/rathole -s /etc/rathole/rathole.toml +# without root +# ExecStart=%h/.local/bin/rathole -s %h/.local/etc/rathole/rathole.toml + +[Install] +WantedBy=multi-user.target +EOF \ No newline at end of file