Add install.sh
This commit is contained in:
commit
dd5a398a92
26
install.sh
Normal file
26
install.sh
Normal file
@ -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 <<EOF > /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
|
Loading…
Reference in New Issue
Block a user