From dd5a398a920ea492fc9c0a9aa790007450dce04b Mon Sep 17 00:00:00 2001 From: mikula Date: Wed, 12 Jun 2024 19:39:21 +0200 Subject: [PATCH] Add install.sh --- install.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 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