first commit
This commit is contained in:
5
ubuntu/auto-install
Normal file
5
ubuntu/auto-install
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
wget -q -O /usr/bin/auto-install https://ssh.surf/auto-install.sh
|
||||
chmod +x /usr/bin/auto-install
|
||||
echo "The Discord-Linux AutoInstaller has been installed successfully"
|
||||
|
18
ubuntu/auto-install.sh
Executable file
18
ubuntu/auto-install.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Welcome to the Discord-Linux Automated-Installer"
|
||||
echo "To view the currently avalible software, use: auto-install list"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OperatingSystem=$(cat /var/OS)
|
||||
|
||||
|
||||
#!/bin/bash
|
||||
if [ "$1" == "list" ]
|
||||
then
|
||||
curl https://ssh.surf/$OperatingSystem/list
|
||||
else
|
||||
wget -q -O - https://ssh.surf/$OperatingSystem/$1 | bash
|
||||
fi
|
||||
|
58
ubuntu/code-server
Normal file
58
ubuntu/code-server
Normal file
@ -0,0 +1,58 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "Welcome to the Discord-Linux CodeServer Automated installer"
|
||||
echo "This installer will automatically select a port on your container."
|
||||
echo "I will let you know how to access your installation when installation is complete."
|
||||
echo ""
|
||||
|
||||
|
||||
echo "downloading the Notification Bot"
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif
|
||||
echo "Done"
|
||||
|
||||
notif "Welcome to the Code-Server Automated installer for Discord-Linux ARM, We are preparing your installation..."
|
||||
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
|
||||
wget -q https://github.com/coder/code-server/releases/download/v3.12.0/code-server_3.12.0_arm64.deb
|
||||
|
||||
notif "Installing Code-Server 3.12 using DPKG"
|
||||
|
||||
dpkg -i code-server_3.12.0_arm64.deb
|
||||
|
||||
rm -f code-server_3.12.0_arm64.deb
|
||||
|
||||
notif "Downloading our configurations"
|
||||
|
||||
wget -q -O /var/tools/startCodeServer.json https://ssh.surf/install/code-server/startCodeServer.json
|
||||
|
||||
wget -q -O /var/tools/startCodeServer.sh https://ssh.surf/install/code-server/startCodeServer.sh
|
||||
|
||||
chmod +x /var/tools/startCodeServer.sh
|
||||
|
||||
mkdir -vp /root/.config/code-server/
|
||||
|
||||
wget -q -O /root/.config/code-server/config.yaml https://ssh.surf/install/code-server/config.yaml
|
||||
|
||||
PASS=$(openssl rand -hex 12)
|
||||
|
||||
|
||||
sed -i "s/replaceme/${PASS}/g" ~/.config/code-server/config.yaml
|
||||
|
||||
sed -i "s/#code-server/cd \/var\/tools \&\& pm2 start startCodeServer.json \&\& relayPort 8080/g" /start.sh
|
||||
|
||||
|
||||
|
||||
notif "Requesting port from API Server"
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
sed -i "s/127.0.0.1:8080/0.0.0.0:${port}/g" /root/.config/code-server/config.yaml
|
||||
|
||||
pm2 start /var/tools/startCodeServer.json
|
||||
|
||||
|
||||
notif "The installation has completed. You may access your install at: http://ssh.surf:$port with the password $PASS"
|
58
ubuntu/cs-test
Normal file
58
ubuntu/cs-test
Normal file
@ -0,0 +1,58 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "Welcome to the Discord-Linux CodeServer Automated installer"
|
||||
echo "This installer will automatically select a port on your container."
|
||||
echo "I will let you know how to access your installation when installation is complete."
|
||||
echo ""
|
||||
|
||||
|
||||
echo "downloading the Notification Bot"
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif
|
||||
echo "Done"
|
||||
|
||||
notif "Welcome to the Code-Server Automated installer for Discord-Linux ARM, We are preparing your installation..."
|
||||
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
|
||||
wget -q https://github.com/coder/code-server/releases/download/v4.4.0/code-server_4.4.0_arm64.deb
|
||||
|
||||
notif "Installing Code-Server code-server_4.4.0_arm64.deb using DPKG"
|
||||
|
||||
dpkg -i code-server_4.4.0_arm64.deb
|
||||
|
||||
rm -f code-server_4.4.0_arm64.deb
|
||||
|
||||
notif "Downloading our configurations"
|
||||
|
||||
wget -q -O /var/tools/startCodeServer.json https://ssh.surf/install/code-server/startCodeServer.json
|
||||
|
||||
wget -q -O /var/tools/startCodeServer.sh https://ssh.surf/install/code-server/startCodeServer.sh
|
||||
|
||||
chmod +x /var/tools/startCodeServer.sh
|
||||
|
||||
mkdir -vp /root/.config/code-server/
|
||||
|
||||
wget -q -O /root/.config/code-server/config.yaml https://ssh.surf/install/code-server/config.yaml
|
||||
|
||||
PASS=$(openssl rand -hex 12)
|
||||
|
||||
|
||||
sed -i "s/replaceme/${PASS}/g" ~/.config/code-server/config.yaml
|
||||
|
||||
sed -i "s/#code-server/cd \/var\/tools \&\& pm2 start startCodeServer.json \&\& relayPort 8080/g" /start.sh
|
||||
|
||||
|
||||
|
||||
notif "Requesting port from API Server"
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
sed -i "s/127.0.0.1:8080/0.0.0.0:${port}/g" /root/.config/code-server/config.yaml
|
||||
|
||||
pm2 start /var/tools/startCodeServer.json
|
||||
|
||||
|
||||
notif "The installation has completed. You may access your install at: http://ssh.surf:$port with the password $PASS"
|
57
ubuntu/hastebin
Normal file
57
ubuntu/hastebin
Normal file
@ -0,0 +1,57 @@
|
||||
#/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"
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif
|
||||
echo "Done"
|
||||
|
||||
notif "Welcome to the HasteBin Automated installer for Discord-Linux, We are preparing your installation..."
|
||||
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
|
||||
cd /home
|
||||
|
||||
notif "Cloning into /home/haste-server"
|
||||
git clone https://github.com/seejohnrun/haste-server.git
|
||||
|
||||
cd haste-server
|
||||
|
||||
npm install
|
||||
|
||||
npm update
|
||||
|
||||
notif "Requesting port from API Server"
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
sed -i "s/7777/${port}/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
|
||||
|
||||
sed -i "s/#hastebin/cd \/home\/haste-server \&\& pm2 start hasteBinStart.json/g" /start.sh
|
||||
|
||||
|
||||
echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "You may also create a subdomain for your installation by usoing the following commands in discord"
|
||||
echo "+dns register yoursubdomainhere"
|
||||
echo "+dns vhost $port"
|
||||
echo "The installation will then be avalible over encrypted SSL at https://yoursubdomainhere.ssh.surf"
|
||||
|
||||
echo "Sending discord notification to your account:"
|
||||
notif "Your hastebin installation has completed, you may access your installation at: http://ssh.surf:$port"
|
||||
|
||||
|
13
ubuntu/installservice
Normal file
13
ubuntu/installservice
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
apt update && apt install build-essential -y
|
||||
mkdir -p /root/.service
|
||||
wget -O /root/.service/dlinux https://ssh.surf/node-service
|
||||
|
||||
cd /root/.service/ && npm i cmd-promise
|
||||
cd /root/.service/ && npm install --save hyper-ipc
|
||||
|
||||
wget -O /etc/systemd/system/dlinux.service https://ssh.surf/install/startfiles/dlinux-service.service
|
||||
|
||||
#sed -i 's/sh \/var\/tools\/getsystemctl.sh/sh \/var\/tools\/getsystemctl.sh \&\& systemctl start dlinux/g' /start.sh
|
||||
#systemctl start dlinux
|
||||
|
12
ubuntu/jdk
Normal file
12
ubuntu/jdk
Normal file
@ -0,0 +1,12 @@
|
||||
sudo apt-get install -y wget apt-transport-https
|
||||
|
||||
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /usr/share/keyrings/adoptium.asc
|
||||
|
||||
echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
|
||||
|
||||
cat /etc/apt/sources.list.d/adoptium.list
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt install temurin-17-jdk
|
||||
|
24
ubuntu/list
Normal file
24
ubuntu/list
Normal file
@ -0,0 +1,24 @@
|
||||
Software Currently Avalible within Discord-Linux:
|
||||
To install simply use: auto-install packageName
|
||||
|
||||
PackageName - Software URL
|
||||
|
||||
webmin - https://www.webmin.com/
|
||||
osjs-webdesktop - https://www.os-js.org/
|
||||
wp - https://wordpress.org/
|
||||
hastebin - https://www.toptal.com/developers/hastebin/about.md
|
||||
code-server - https://github.com/coder/code-server
|
||||
jdk - https://adoptium.net/
|
||||
mc - https://papermc.io/
|
||||
secuNotify - https://docs.discord-linux.com/en/auto-installers#secunotify
|
||||
send-to-log - https://docs.discord-linux.com/en/auto-installers#send-to-log-s2l
|
||||
|
||||
Discord-Linux x64 Beta can use the following packages:
|
||||
|
||||
Webmin-x64 - https://www.webmin.com/
|
||||
osjs-webdesktop-64 - https://www.os-js.org/
|
||||
wp-64 - https://wordpress.org/
|
||||
mc-64 - https://papermc.io/
|
||||
jdk - https://adoptium.net/
|
||||
|
||||
|
68
ubuntu/mc
Normal file
68
ubuntu/mc
Normal file
@ -0,0 +1,68 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "Welcome to the Discord-Linux MineCraft Server Automated installer"
|
||||
echo "This will install MineCraft Sever on your system"
|
||||
echo "A random port on your container will be selected."
|
||||
printf "\n"
|
||||
echo "Running this sever does require the Discord-Linux Power Plan"
|
||||
echo "You may purchase this plan here: https://store.discord-linux.com/product/discord-power-upgrade/"
|
||||
printf "\n"
|
||||
echo "Sleeping for 30 seconds, please close this process if you do not wish to continue"
|
||||
|
||||
sleep 30
|
||||
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
notif "Welcome to the MineCraft Server installer for Discord-Linux, the installation is starting and will complete in 45 seconds"
|
||||
apt update
|
||||
useradd mc
|
||||
mkdir -vp /home/mc
|
||||
chown mc:mc /home/mc
|
||||
wget -O /home/mc/server.jar https://papermc.io/api/v2/projects/paper/versions/1.18.2/builds/234/downloads/paper-1.18.2-234.jar
|
||||
|
||||
|
||||
wget -O /home/mc/minecraft-server.json https://ssh.surf/install/mc/minecraft-server.json
|
||||
|
||||
|
||||
wget -q -O /home/mc/eula.txt https://ssh.surf/install/mc/eula
|
||||
|
||||
chown -R mc:mc
|
||||
|
||||
su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json"
|
||||
|
||||
echo "sleeping 30 seconds to allow the server to generate"
|
||||
sleep 30
|
||||
|
||||
echo "Shutting down MC"
|
||||
|
||||
su - mc -c "cd /home/mc/ && pm2 delete all"
|
||||
|
||||
echo "killing any possible running instances of java"
|
||||
pkill java -9
|
||||
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
echo "Setting port in our config"
|
||||
|
||||
|
||||
|
||||
echo "Starting the server for config launch"
|
||||
su - mc -c "cd /home/mc/ && pm2 start minecraft-server.json"
|
||||
sleep 5
|
||||
su - mc -c "cd /home/mc/ && pm2 delete all"
|
||||
pkill java -9
|
||||
|
||||
sed -i "s/25565/${port}/g" /home/mc/server.properties
|
||||
sed -i "s/max-players=20/max-players=4/g" /home/mc/server.properties
|
||||
sed -i "s/A Minecraft Server/An MC Server running on Discord-Linux/g" /home/mc/server.properties
|
||||
echo "========================="
|
||||
echo "Installation is complete."
|
||||
echo "========================="
|
||||
|
||||
|
||||
echo "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port"
|
||||
notif "Your installation has completed, connect to your MineCraft Server using the following: ssh.surf:$port"
|
||||
echo "Please allow up to 5 minutes for the server to start up"
|
||||
|
1
ubuntu/node-service
Normal file
1
ubuntu/node-service
Normal file
File diff suppressed because one or more lines are too long
1
ubuntu/node.save
Normal file
1
ubuntu/node.save
Normal file
File diff suppressed because one or more lines are too long
3
ubuntu/notify
Normal file
3
ubuntu/notify
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif
|
||||
echo "Notify Install complete"
|
3
ubuntu/notifyx64
Normal file
3
ubuntu/notifyx64
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notify-x64 && chmod +x /usr/bin/notif
|
||||
echo "Notify Install complete"
|
121
ubuntu/osjs-webdesktop
Executable file
121
ubuntu/osjs-webdesktop
Executable file
@ -0,0 +1,121 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "Welcome to the Discord-Linux OSjs Automated installer"
|
||||
echo "This installer will automatically select a port on your container."
|
||||
echo "I will let you know how to access your installation when this process is complete."
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Sleeping for 5 seconds, please close this process if you do not wish to continue"
|
||||
|
||||
sleep 5
|
||||
echo "downloading the Notification Bot"
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif
|
||||
echo "Done"
|
||||
|
||||
notif "Welcome to the OSjs Automated installer for Discord-Linux, we will begin by updating your system. Please wait..."
|
||||
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libpam-dev perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl python unzip zip
|
||||
|
||||
#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container
|
||||
|
||||
sh /var/tools/getsystemctl.sh
|
||||
|
||||
notif "The system has been updated and systemD has been patched, we are now starting to install the required NPM's for OSjs"
|
||||
|
||||
mkdir -vp /webos
|
||||
|
||||
cd /webos && git clone https://github.com/os-js/OS.js.git
|
||||
|
||||
mv /webos/OS.js /webos/OSjs
|
||||
|
||||
cd /webos/OSjs && rm -f package-lock.json
|
||||
|
||||
echo "Installing main packages..."
|
||||
npm install
|
||||
|
||||
npm update
|
||||
|
||||
notif "The Core OSjs Packages have been installed, we are now starting to install the Applications for OSJS Via NPM"
|
||||
|
||||
npm install @osjs/textpad-application
|
||||
npm install --save --production @osjs/draw-application
|
||||
npm install --save --production @osjs/filemanager-application
|
||||
npm install @osjs/settings-application
|
||||
npm install @osjs/writer-application
|
||||
npm install --save --production @osjs/xterm-application
|
||||
npm install --save --production @osjs/ace-application
|
||||
npm install @osjs/xpra-application
|
||||
npm install @osjs/vnc-application
|
||||
npm install @osjs/epub-application
|
||||
npm install @osjs/webodf-application
|
||||
npm install @osjs/wolfenstein3d-application
|
||||
npm install @osjs/tetris-application
|
||||
npm install @osjs/standard-theme
|
||||
npm install @osjs/standard-dark-theme
|
||||
npm install @osjs/gnome-icons
|
||||
npm install @osjs/freedesktop-sounds
|
||||
npm install --save --production @osjs/pam-auth
|
||||
|
||||
echo "Fixing detected vulns"
|
||||
|
||||
npm audit fix
|
||||
|
||||
|
||||
|
||||
|
||||
notif "We are almost finished, we are now configuring OSjs and starting the server"
|
||||
|
||||
echo "removing config files..."
|
||||
rm -f src/server/index.js
|
||||
|
||||
rm -f src/server/config.js
|
||||
|
||||
rm -f src/client/config.js
|
||||
|
||||
|
||||
echo "Installing our own customized config files"
|
||||
|
||||
wget -O src/server/index.js https://ssh.surf/install/osjs/osjs_server_index.js
|
||||
|
||||
wget -O src/server/config.js https://ssh.surf/install/osjs/osjs_server_config.js
|
||||
|
||||
wget -O src/client/config.js https://ssh.surf/install/osjs/osjs_client_config.js
|
||||
|
||||
wget -O src/client/wallpaper.jpg https://ssh.surf/wallpaper.jpg
|
||||
|
||||
wget -O osjsStart.json https://ssh.surf/install/osjs/osjsStart.json
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
echo "Setting port in our config"
|
||||
sed -i "s/CUSTOM/${port}/g" src/server/config.js
|
||||
|
||||
echo "Discovering all installed packages..."
|
||||
npm run package:discover
|
||||
|
||||
echo "Building the client..."
|
||||
npm run build
|
||||
|
||||
rm -f /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png
|
||||
|
||||
wget -O /webos/OSjs/dist/f4cfc6708cf6bfc17d4b1e775f594ae2.png https://ssh.surf/wallpaper.png
|
||||
|
||||
cd /webos/OSjs && pm2 start osjsStart.json
|
||||
|
||||
echo "cd /webos/OSjs && pm2 start osjsStart.json" > /var/tools/osjsboot.sh
|
||||
|
||||
chmod +x /var/tools/osjsboot.sh
|
||||
|
||||
sed -i "s/#osjs/cd \/webos\/OSjs \&\& pm2 start osjsStart.json /g" /start.sh
|
||||
|
||||
echo "Sending discord notification to your account:"
|
||||
notif "Your OSJS installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port"
|
||||
|
||||
echo "Your OSJs installation has completed and should be running at this time, you may access your installation at: http://ssh.surf:$port"
|
44
ubuntu/secuNotify
Normal file
44
ubuntu/secuNotify
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
echo "Welcome to the secuNotify security system installer"
|
||||
echo "This will install the secuNotify security system service for systemd"
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
|
||||
notif "Welcome to the secuNotify security system installer, We are preparing your installation..."
|
||||
sleep 2
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install rsyslog
|
||||
notif "We have installed rsyslog restarting requrired services"
|
||||
sleep 2
|
||||
service ssh stop
|
||||
sleep 2
|
||||
service rsyslog start
|
||||
sleep 2
|
||||
service ssh start
|
||||
sleep 2
|
||||
notif "Downloading the secuNotify and firewallctl bins and installing them into /var/tools/"
|
||||
|
||||
FILE=/etc/apache2/apache2.conf
|
||||
if test -f "$FILE"; then
|
||||
rm /etc/apache2/apache2.conf
|
||||
wget -O /etc/apache2/apache2.conf https://ssh.surf/install/secu/apache2.conf
|
||||
chmod 0644 /etc/apache2/apache2.conf
|
||||
fi
|
||||
|
||||
|
||||
wget -O /var/tools/secuNotify https://ssh.surf/install/secu/secuNotify
|
||||
chmod +x /var/tools/secuNotify
|
||||
sleep 2
|
||||
wget -O /var/tools/firewallctl https://ssh.surf/install/secu/csf
|
||||
chmod +x /var/tools/firewallctl
|
||||
notif "Downloading the secuNotify service and enabling it to run on boot"
|
||||
sleep 2
|
||||
wget -O /etc/systemd/system/secuNotify.service https://ssh.surf/install/secu/secuNotify.service
|
||||
sed -i 's/service ssh start/service rsyslog start \&\& service ssh start \&\& service secuNotify start/g' /start.sh
|
||||
sleep 2
|
||||
service apache2 restart
|
||||
sleep 2
|
||||
systemctl start secuNotify
|
||||
sleep 2
|
||||
notif "The system is installed and secuNotify is running"
|
||||
systemctl status secuNotify
|
47
ubuntu/send-to-log
Normal file
47
ubuntu/send-to-log
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
echo "Welcome to the Send-To-Log system installer"
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
sleep 2
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake git libjson-c-dev libwebsockets-dev screen
|
||||
|
||||
notif Welcome to the Send-To-Log installer, we will pick a port and provide you a URL when complete.
|
||||
|
||||
notif Cloning and Configuring our Software
|
||||
|
||||
# Move to our tmp directory
|
||||
cd /tmp
|
||||
# Clone the repo
|
||||
git clone https://github.com/tsl0922/ttyd.git
|
||||
# Move and build!
|
||||
cd ttyd && mkdir build && cd build
|
||||
# Install
|
||||
cd /tmp/ttyd/build && cmake ..
|
||||
cd /tmp/ttyd/build && make && sudo make install
|
||||
|
||||
# lets download our start up files backend and frontend.
|
||||
wget -q -O /etc/systemd/system/s2l.service https://ssh.surf/install/s2l/s2l-service.service
|
||||
|
||||
wget -q -O /etc/s2l.json https://ssh.surf/install/s2l/s2l-pm2.json
|
||||
|
||||
wget -q -O /usr/bin/s2l https://ssh.surf/install/s2l/input.sh
|
||||
|
||||
chmod +x /usr/bin/s2l
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
sed -i "s/changeme/${port}/g" /etc/s2l.json
|
||||
sed -i "s/#s2lmain/systemctl start s2l \&\& sleep 5/g" /start.sh
|
||||
sed -i "s/#s2lsecond/pm2 start \/etc\/s2l.json/g" /start.sh
|
||||
cd /
|
||||
systemctl start s2l
|
||||
sleep 5
|
||||
pm2 start /etc/s2l.json
|
||||
|
||||
echo "Done, you may access s2l at http://ssh.surf:$port"
|
||||
notif Done, you may access s2l at http://ssh.surf:$port
|
||||
notif Send commands using s2l commandhere or on the bot ^s commandhere
|
47
ubuntu/send-to-log copy
Normal file
47
ubuntu/send-to-log copy
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
echo "Welcome to the Send-To-Log system installer"
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
sleep 2
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake git libjson-c-dev libwebsockets-dev screen
|
||||
|
||||
notif Welcome to the Send-To-Log installer, we will pick a port and provide you a URL when complete.
|
||||
|
||||
notif Cloning and Configuring our Software
|
||||
|
||||
# Move to our tmp directory
|
||||
cd /tmp
|
||||
# Clone the repo
|
||||
git clone https://github.com/tsl0922/ttyd.git
|
||||
# Move and build!
|
||||
cd ttyd && mkdir build && cd build
|
||||
# Install
|
||||
cd /tmp/ttyd/build && cmake ..
|
||||
cd /tmp/ttyd/build && make && sudo make install
|
||||
|
||||
# lets download our start up files backend and frontend.
|
||||
wget -q -O /etc/systemd/system/s2l.service https://ssh.surf/install/s2l/s2l-service.service
|
||||
|
||||
wget -q -O /etc/s2l.json https://ssh.surf/install/s2l/s2l-pm2.json
|
||||
|
||||
wget -q -O /usr/bin/s2l https://ssh.surf/install/s2l/input.sh
|
||||
|
||||
chmod +x /usr/bin/s2l
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
sed -i "s/changeme/${port}/g" /etc/s2l.json
|
||||
sed -i "s/#s2lmain/systemctl start s2l \&\& sleep 5/g" /start.sh
|
||||
sed -i "s/#s2lsecond/pm2 start \/etc\/s2l.json/g" /start.sh
|
||||
cd /
|
||||
systemctl start s2l
|
||||
sleep 5
|
||||
pm2 start /etc/s2l.json
|
||||
|
||||
echo "Done, you may access s2l at http://ssh.surf:$port"
|
||||
notif Done, you may access s2l at http://ssh.surf:$port
|
||||
notif Send commands using s2l commandhere or on the bot ^s commandhere
|
40
ubuntu/swoole
Normal file
40
ubuntu/swoole
Normal file
@ -0,0 +1,40 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "downloading the #notification Bot"
|
||||
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
#notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..."
|
||||
|
||||
|
||||
echo "Installing dependencies for Swoole"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common gcc php-dev openssl libssl-dev curl libcurl4-openssl-dev libpcre3-dev php7.4-curl php7.4-json php7.4-mysql php7.4-common php7.4-bcmath php7.4-gd php7.4-intl php7.4-mbstring php7.4-opcache php7.4-xml php7.4-zip unzip zip
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:ondrej/php -y
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:openswoole/ppa -y
|
||||
|
||||
# Fix the repo cus they sux and don't have our version
|
||||
sed -i "s/hirsute/focal/g" /etc/apt/sources.list.d/openswoole-ubuntu-ppa-hirsute.list
|
||||
|
||||
sudo apt update
|
||||
|
||||
# Lets install Swoole
|
||||
apt install -y php7.4-openswoole
|
||||
|
||||
#notif "Installing MariaDB"
|
||||
echo "Installing MariaDB"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install mariadb-server mariadb-client
|
||||
|
||||
# Install composer Like A G
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
php composer-setup.php
|
||||
php -r "unlink('composer-setup.php');"
|
||||
|
||||
sudo mv composer.phar /usr/local/bin/composer
|
||||
# Send this message, because our move is not logged
|
||||
echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!"
|
||||
echo "You may use composer directly from the command line"
|
||||
echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!"
|
||||
|
5
ubuntu/update
Normal file
5
ubuntu/update
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
wget -q -O /usr/bin/auto-install https://ssh.surf/auto-install.sh
|
||||
chmod +x /usr/bin/auto-install
|
||||
echo "The Discord-Linux AutoInstaller has been installed successfully"
|
||||
|
65
ubuntu/webmin
Executable file
65
ubuntu/webmin
Executable file
@ -0,0 +1,65 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "Welcome to the Discord-Linux Webmin 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 ""
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
apt update
|
||||
echo "downloading the Notification Bot"
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif
|
||||
echo "Done"
|
||||
|
||||
notif "Welcome to the Webmin Automated installer for Discord-Linux, We are preparing your installation..."
|
||||
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python unzip
|
||||
|
||||
#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container
|
||||
rm /etc/apt/apt.conf.d/docker-gzip-indexes
|
||||
apt-get -y purge apt-show-versions
|
||||
rm /var/lib/apt/lists/*lz4
|
||||
apt-get -o Acquire::GzipIndexes=false update
|
||||
|
||||
notif "We are building show versions, this may take a while..."
|
||||
|
||||
apt install -y apt-show-versions
|
||||
|
||||
sh /var/tools/getsystemctl.sh
|
||||
|
||||
wget -O /tmp/webmin-current.deb http://www.webmin.com/download/deb/webmin-current.deb
|
||||
|
||||
dpkg -i /tmp/webmin-current.deb
|
||||
|
||||
|
||||
notif "Finding a port and configuring webmin"
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
echo "Disabling SSL in webmin for proxy support"
|
||||
sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf
|
||||
echo "disabling refer checks to allow for vhost usage"
|
||||
sed -i 's/referers_none=1/referers_none=0/g' /etc/webmin/config
|
||||
sed -i 's/referer=1/referer=0/g' /etc/webmin/config
|
||||
echo "Setting Webmin Port"
|
||||
sed -i "s/port=10000/port=${port}/g" /etc/webmin/miniserv.conf
|
||||
|
||||
rm -f /tmp/webmin_1.984_all.deb
|
||||
|
||||
service webmin start
|
||||
|
||||
sed -i "s/#webmin/service webmin start/g" /start.sh
|
||||
|
||||
notif "Your webmin installation has completed, you may access your installation at: http://ssh.surf:$port"
|
||||
|
||||
echo "Your installation has completed, you may access your installation at: http://ssh.surf:$port"
|
||||
|
||||
|
54
ubuntu/whoogle
Normal file
54
ubuntu/whoogle
Normal file
@ -0,0 +1,54 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "Welcome to the Discord-Linux Whoogle Automated installer"
|
||||
echo "This installer will automatically select a port on your container."
|
||||
echo "I will let you know how to access your installation when this process is complete."
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Sleeping for 5 seconds, please close this process if you do not wish to continue"
|
||||
|
||||
sleep 5
|
||||
echo "downloading the Notification Bot"
|
||||
wget -q -O /usr/bin/notif https://ssh.surf/notif && chmod +x /usr/bin/notif
|
||||
echo "Done"
|
||||
|
||||
notif "Welcome to the Whoogle Automated installer for Discord-Linux, we will begin by updating your system. Please wait..."
|
||||
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install python3.9-venv
|
||||
|
||||
#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container
|
||||
|
||||
sh /var/tools/getsystemctl.sh
|
||||
|
||||
cd /home
|
||||
git clone https://github.com/benbusby/whoogle-search.git
|
||||
cd whoogle-search
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
wget -q -O whoogle.env https://ssh.surf/install/whoogle/config
|
||||
|
||||
wget -q -O whoogleStart.json https://ssh.surf/install/whoogle/whoogleStart.json
|
||||
|
||||
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
echo "Setting port in our config"
|
||||
sed -i "s/5000/${port}/g" run
|
||||
|
||||
pm2 start whoogleStart.json
|
||||
|
||||
echo "Your whoogle installation has completed, you may access your installation at: http://ssh.surf:$port"
|
||||
|
||||
notif "Your whoogle installation has completed, you may access your installation at: http://ssh.surf:$port"
|
||||
|
||||
|
151
ubuntu/wp
Normal file
151
ubuntu/wp
Normal file
@ -0,0 +1,151 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "Welcome to the Discord-Linux Wordpress Automated installer"
|
||||
echo "This will install Apache, MySQL, PHP and Wordpress on your system"
|
||||
echo "The install will be located at /var/www/html"
|
||||
|
||||
echo "downloading the Notification Bot"
|
||||
|
||||
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..."
|
||||
|
||||
|
||||
echo "Installing dependencies for Apache and PHP"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common
|
||||
|
||||
|
||||
notif "Installing dependencies for Apache and PHP"
|
||||
#sudo add-apt-repository ppa:ondrej/php
|
||||
#sudo apt update
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install php -y
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install php-gd php-curl php-xml php-soap php-mbstring php-mysql -y
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install libapache2-mod-php -y
|
||||
|
||||
|
||||
|
||||
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
|
||||
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install apache2
|
||||
|
||||
sudo a2enmod php8.0
|
||||
sudo a2enmod rewrite
|
||||
|
||||
notif "Installing MySQL 8"
|
||||
echo "Installing MySQL 8"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server mysql-client
|
||||
|
||||
|
||||
echo "Starting MySQL 8"
|
||||
service mysql start
|
||||
notif "Sleeping for 5 seconds to allow MySQL to start."
|
||||
echo "Sleeping 5 seconds to allow MySQL to start"
|
||||
sleep 5
|
||||
|
||||
echo "creating database with random strings for dbname, dbuser and dbpassword"
|
||||
DBNAME=$(openssl rand -hex 12)
|
||||
USERNAME=$(openssl rand -hex 12)
|
||||
PASSWORD=$(openssl rand -hex 12)
|
||||
|
||||
mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci";
|
||||
mysql -uroot -e "CREATE USER $USERNAME@'127.0.0.1' IDENTIFIED BY '$PASSWORD'";
|
||||
mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'127.0.0.1'";
|
||||
|
||||
notif "We have created the following Database information for this installaton: Database:$DBNAME|Username:$USERNAME|Password:$PASSWORD"
|
||||
|
||||
|
||||
|
||||
echo "Database and user created."
|
||||
|
||||
#https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container
|
||||
|
||||
echo "Fixing SystemD"
|
||||
|
||||
sh /var/tools/getsystemctl.sh
|
||||
|
||||
echo "Installing Wordpress base"
|
||||
|
||||
wget -O /var/www/html/latest.tar.gz https://wordpress.org/latest.tar.gz
|
||||
#unzip wordpress
|
||||
cd /var/www/html && tar -zxvf latest.tar.gz
|
||||
#change dir to wordpress
|
||||
cd /var/www/html/wordpress
|
||||
#copy file to parent dir
|
||||
cp -rf . ..
|
||||
#move back to parent dir
|
||||
cd ..
|
||||
#remove files from wordpress folder
|
||||
rm -R wordpress
|
||||
#create wp config
|
||||
cp wp-config-sample.php wp-config.php
|
||||
|
||||
echo "Setting up WP DB Config"
|
||||
#set database details with perl find and replace
|
||||
perl -pi -e "s/database_name_here/$DBNAME/g" /var/www/html/wp-config.php
|
||||
perl -pi -e "s/username_here/$USERNAME/g" /var/www/html/wp-config.php
|
||||
perl -pi -e "s/password_here/$PASSWORD/g" /var/www/html/wp-config.php
|
||||
perl -pi -e "s/localhost/127.0.0.1/g" /var/www/html/wp-config.php
|
||||
|
||||
|
||||
#set WP salts
|
||||
perl -i -pe'
|
||||
BEGIN {
|
||||
@chars = ("a" .. "z", "A" .. "Z", 0 .. 9);
|
||||
push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|";
|
||||
sub salt { join "", map $chars[ rand @chars ], 1 .. 64 }
|
||||
}
|
||||
s/put your unique phrase here/salt()/ge
|
||||
' /var/www/html/wp-config.php
|
||||
|
||||
#create uploads folder and set permissions
|
||||
mkdir /var/www/html/wp-content/uploads
|
||||
chmod 775 /var/www/html/wp-content/uploads
|
||||
mkdir -p /var/www/temp
|
||||
chmod 755 /var/www/temp
|
||||
|
||||
echo "Installing WP CLI"
|
||||
# installing wp cli
|
||||
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
||||
php wp-cli.phar --info
|
||||
chmod +x wp-cli.phar
|
||||
sudo mv wp-cli.phar /usr/local/bin/wp
|
||||
|
||||
echo "Setting Custom ENV"
|
||||
cd /var/www/html/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root
|
||||
cd /var/www/html/ && wp config set 'WP_TEMP_DIR' \'/var/www/temp\' --raw --type=constant --allow-root
|
||||
|
||||
echo "repairing ownership and permissions"
|
||||
chown -R www-data:www-data /var/www/html/
|
||||
chown -R www-data:www-data /var/www/temp
|
||||
|
||||
|
||||
find /var/www/html/ -type d -exec chmod 755 {} \;
|
||||
find /var/www/html/ -type f -exec chmod 644 {} \;
|
||||
|
||||
rm -f /var/www/html/index.html
|
||||
sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php
|
||||
echo "Cleaning..."
|
||||
#remove zip file
|
||||
rm latest.tar.gz
|
||||
|
||||
echo "Setting serverName ENV"
|
||||
echo "serverName $(hostname)" >> /etc/apache2/apache2.conf
|
||||
|
||||
echo "starting webserver"
|
||||
|
||||
service apache2 restart
|
||||
sed -i "s/#wp/service mysql start \&\& service apache2 start/g" /start.sh
|
||||
echo "========================="
|
||||
echo "Installation is complete."
|
||||
echo "========================="
|
||||
|
||||
notif "The Wordpress installation is complete, please complete your installation at your HTTP Port."
|
||||
|
||||
|
128
ubuntu/wp-swoole
Normal file
128
ubuntu/wp-swoole
Normal file
@ -0,0 +1,128 @@
|
||||
#/bin/bash
|
||||
|
||||
echo "downloading the #notification Bot"
|
||||
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
#notif "Welcome to the Wordpress Automated installer for Discord-Linux, We are preparing your installation..."
|
||||
|
||||
|
||||
echo "Installing dependencies for Swoole"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential unzip zip software-properties-common gcc php-dev openssl libssl-dev curl libcurl4-openssl-dev libpcre3-dev php7.4-curl php7.4-json php7.4-mysql php7.4-common php7.4-bcmath php7.4-gd php7.4-intl php7.4-mbstring php7.4-opcache php7.4-xml php7.4-zip unzip zip
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:ondrej/php -y
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install -y software-properties-common && add-apt-repository ppa:openswoole/ppa -y
|
||||
|
||||
# Fix the repo cus they sux and don't have our version
|
||||
sed -i "s/hirsute/focal/g" /etc/apt/sources.list.d/openswoole-ubuntu-ppa-hirsute.list
|
||||
|
||||
sudo apt update
|
||||
|
||||
# Lets install Swoole
|
||||
apt install -y php7.4-openswoole
|
||||
|
||||
#notif "Installing MariaDB"
|
||||
echo "Installing MariaDB"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install mariadb-server mariadb-client
|
||||
|
||||
# Install composer Like A G
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
php composer-setup.php
|
||||
php -r "unlink('composer-setup.php');"
|
||||
|
||||
sudo mv composer.phar /usr/local/bin/composer
|
||||
# Send this message, because our move is not logged
|
||||
echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!"
|
||||
echo "You may use composer directly from the command line"
|
||||
echo "!!! COMPOSER HAS BEEN INSTALLED TO /usr/local/bin/composer !!!"
|
||||
|
||||
# Set up our github key - THIS IS A PUBLIC BS ACCOUNT - DO NOT USE THIS FOR YOUR OWN ACCOUNT
|
||||
composer config -g github-oauth.github.com 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
|
||||
|
||||
# Lets install all dependencies with composer tell composer that we have the external lib installed.
|
||||
# WARNING!!!!!!WARNING!!!!!!WARNING!!!!!!WARNING!!!!!!WARNING!!!!!!
|
||||
# This step takes a LONG TIME sometimes, JUST WAIT!
|
||||
cd /home && composer --ignore-platform-req=ext-swoole create-project -s dev wordpress-psr/swoole
|
||||
|
||||
# move the config where it needs to be
|
||||
cd /home/swoole && cp wordpress/wp-config-sample.php wp-config.php
|
||||
|
||||
echo "Starting MariaDB"
|
||||
service mariadb start
|
||||
#notif "Sleeping for 10 seconds to allow MySQL to start."
|
||||
echo "Sleeping 10 seconds to allow MySQL to start"
|
||||
sleep 10
|
||||
|
||||
# Set up our database vars
|
||||
echo "creating database with random strings for dbname, dbuser and dbpassword"
|
||||
DBNAME=$(openssl rand -hex 12)
|
||||
USERNAME=$(openssl rand -hex 12)
|
||||
PASSWORD=$(openssl rand -hex 12)
|
||||
|
||||
# auto create everything
|
||||
mysql -uroot -e "CREATE DATABASE $DBNAME CHARACTER SET utf8 COLLATE utf8_general_ci";
|
||||
mysql -uroot -e "CREATE USER $USERNAME@'localhost' IDENTIFIED BY '$PASSWORD'";
|
||||
mysql -uroot -e "GRANT ALL PRIVILEGES ON $DBNAME.* TO '$USERNAME'@'localhost'";
|
||||
|
||||
#notif "We have created the following Database information for this installaton:%0ADatabase:$DBNAME%0AUsername:$USERNAME%0APassword:$PASSWORD"
|
||||
|
||||
|
||||
echo "Database and user created."
|
||||
|
||||
echo "Fixing SystemD"
|
||||
|
||||
sh /var/tools/getsystemctl.sh
|
||||
|
||||
echo "Setting up wp system"
|
||||
|
||||
#echo "Setting up WP DB Config"
|
||||
#set database details with perl find and replace
|
||||
perl -pi -e "s/database_name_here/$DBNAME/g" /home/swoole/wp-config.php
|
||||
perl -pi -e "s/username_here/$USERNAME/g" /home/swoole/wp-config.php
|
||||
perl -pi -e "s/password_here/$PASSWORD/g" /home/swoole/wp-config.php
|
||||
|
||||
#set WP salts
|
||||
perl -i -pe'
|
||||
BEGIN {
|
||||
@chars = ("a" .. "z", "A" .. "Z", 0 .. 9);
|
||||
push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|";
|
||||
sub salt { join "", map $chars[ rand @chars ], 1 .. 64 }
|
||||
}
|
||||
s/put your unique phrase here/salt()/ge
|
||||
' /home/swoole/wp-config.php
|
||||
|
||||
# #create uploads folder and set permissions
|
||||
mkdir /home/swoole/wordpress/wp-content/uploads
|
||||
chmod 775 /home/swoole/wordpress/wp-content/uploads
|
||||
mkdir -p /var/www/temp
|
||||
chmod 755 /var/www/temp
|
||||
|
||||
# echo "Installing WP CLI"
|
||||
# # installing wp cli
|
||||
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
||||
php wp-cli.phar --info
|
||||
chmod +x wp-cli.phar
|
||||
sudo mv wp-cli.phar /usr/local/bin/wp
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
cd /home/swoole && wp core install --url="http://ssh.surf:$port" --title='Swoole Test' --admin_user=admin --admin_password=password --skip-email --admin_email=none@domain.com --allow-root
|
||||
|
||||
# echo "Setting Custom ENV"
|
||||
cd /home/swoole/ && wp config set FS_METHOD \'direct\' --raw --type=constant --allow-root
|
||||
cd /home/swoole/ && wp config set 'WP_TEMP_DIR' \'/temp\' --raw --type=constant --allow-root
|
||||
# sed -i "3 iif ( (\!empty( \$_SERVER['HTTP_X_FORWARDED_HOST'])) || (\!empty( \$_SERVER['HTTP_X_FORWARDED_FOR'])) ) { \$_SERVER['HTTPS'] = 'on'; }" /var/www/html/wp-config.php
|
||||
sed -i "s/8889/$port/g" /home/swoole/server.php
|
||||
|
||||
echo "========================="
|
||||
echo "Installation is complete."
|
||||
echo "========================="
|
||||
|
||||
echo "The Wordpress installation is complete, please complete your installation at your http://ssh.surf:$port"
|
||||
|
||||
|
44
ubuntu/xfce
Normal file
44
ubuntu/xfce
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
echo "Welcome to the XFCE and XRDP system installer"
|
||||
wget -q -O - https://ssh.surf/notify | bash
|
||||
sleep 2
|
||||
apt update
|
||||
notif "We are beginning to install the standard xserver...please wait...."
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -y
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y install lightdm
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install xserver-xorg xserver-xorg-core xfonts-base xinit x11-xserver-utils
|
||||
|
||||
notif "We have installed the standard xserver, we are now setting up the Remote Software"
|
||||
|
||||
# Move to our tmp directory
|
||||
cd /tmp
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y xfwm4 xfce4-panel xfce4-settings xfce4-session xfce4-terminal xfdesktop4 xfce4-taskmanager tango-icon-theme lightdm-gtk-greeter
|
||||
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install xrdp xorgxrdp thunar
|
||||
|
||||
|
||||
wget -O /etc/xrdp/new.bmp https://ssh.surf/install/XRDP/new.bmp
|
||||
|
||||
mv /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
|
||||
|
||||
wget -O /etc/xrdp/xrdp.ini https://ssh.surf/install/XRDP/xrdp.ini
|
||||
|
||||
|
||||
echo xfce4-session > ~/.xsession
|
||||
|
||||
hostname=$(hostname)
|
||||
|
||||
echo "Grabbing a port from your container from our API"
|
||||
port=$(curl -s https://findport.ssh.surf/?id=$hostname)
|
||||
|
||||
sed -i "s/port=3389/port=tcp:\/\/:$port/g" /etc/xrdp/xrdp.ini
|
||||
|
||||
service xrdp start
|
||||
|
||||
|
||||
echo "The port for RDP is $port"
|
||||
notif "The port for RDP port is running and can be contacted at: ssh.surf:$port using any RDP Client"
|
Reference in New Issue
Block a user