autoinstallers/alma-x64/hastebin

44 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/bash
echo "Welcome to the Discord-Linux HasteBin Automated installer"
echo "This installer will automatically select a port on your container."
echo "I will let you know how to access your Webmin installation when installation is complete."
echo ""
echo "downloading the Notification Bot"
2022-07-06 13:06:45 -04:00
wget -q -O /usr/bin/notif https://ssh.surf/alma-x64/notif && chmod +x /usr/bin/notif
echo "Done"
notif "Welcome to the HasteBin Automated installer for Discord-Linux, We are preparing your installation..."
sleep 3
cd /home
notif "Cloning into /home/haste-server"
git clone https://github.com/seejohnrun/haste-server.git
cd haste-server
npm install
npm update
2022-07-06 13:06:45 -04:00
sed -i "s/7777/10002/g" config.js
notif "Configuring HasteBin and starting it's server"
wget -O hasteBinStart.json https://ssh.surf/install/hastebin
cd /home/haste-server && pm2 start hasteBinStart.json
2022-07-06 13:06:45 -04:00
sed -i "s/#hastebin/cd \/home\/haste-server \&\& pm2 start hasteBinStart.json \&\& relayPort 10002/g" /start.sh
2022-07-06 13:06:45 -04:00
relayPort 10002
sleep 2
2022-07-06 13:06:45 -04:00
url=$(grep -hPo "(?<=listening ).*" /root/.pm2/logs/Relay-10002-out.log | head -n 1 | sed 's/$/.virt.fun/')
2022-07-06 13:06:45 -04:00
notif "Your HasteBin is now running at https://$url"