Compare commits

...

12 Commits

Author SHA1 Message Date
3af125681b gh 2025-06-18 16:27:22 +03:00
dd41b7f878 Update README.md 2025-06-15 13:29:37 +03:00
adf8c33d04 Merge branch 'main' of https://github.com/galoz11/proxy 2025-06-12 15:15:18 +03:00
08766b9394 Merge branch 'main' of https://github.com/galoz11/proxy 2025-06-12 06:24:20 +03:00
c39b6cbc41 Merge branch 'main' of https://github.com/galoz11/proxy 2025-06-11 17:14:19 +03:00
fd0510e756 Merge branch 'main' of https://github.com/galoz11/proxy 2025-06-11 07:36:27 +03:00
b934950e67 Update README.md 2025-06-11 07:36:15 +03:00
225a8ea63d Update README.md 2025-06-11 07:35:19 +03:00
be4e469a38 Merge branch 'main' of https://github.com/galoz11/proxy 2025-06-08 18:54:28 +03:00
9b548d1afe 12 2025-06-07 18:03:48 +03:00
07451953d2 Merge branch 'main' of https://github.com/galoz11/proxy 2025-06-07 18:03:09 +03:00
621180b593 3 2025-06-07 17:58:11 +03:00
5 changed files with 153 additions and 14 deletions

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"editor.fontSize": 14
}

View File

@@ -1,7 +1,13 @@
# proxy ## Proxmox helper scripts...!!!
to use the scripts, type: to use the scripts, type:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/galoz11/proxy/refs/heads/main/<Script_Name>.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/galoz11/proxy/refs/heads/main/<Script_Name>.sh)"
example: example:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/galoz11/proxy/refs/heads/main/code_server.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/galoz11/proxy/refs/heads/main/code_server.sh)"
bash -c "$(curl -fsSL https://raw.githubusercontent.com/galoz11/proxy/refs/heads/main/docker_portainer.sh)"

View File

@@ -1,7 +1,13 @@
#!/bin/bash #!/bin/bash
echo Installing Coder Code Server function header_info {
echo
echo -e " ${DGN}${APP}${CL}"
echo
}
APP="Coder Code Server"
hostname="$(hostname)"
IP=$(hostname -I | awk '{print $1}') IP=$(hostname -I | awk '{print $1}')
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
@@ -10,17 +16,31 @@ BGN=$(echo "\033[4;92m")
GN=$(echo "\033[1;92m") GN=$(echo "\033[1;92m")
DGN=$(echo "\033[32m") DGN=$(echo "\033[32m")
CL=$(echo "\033[m") CL=$(echo "\033[m")
# print overwrite message
BFR="\\r\\033[K"
HOLD="-"
CM="${GN}✓${CL}"
APP="Coder Code Server" # show header info
hostname="$(hostname)" header_info
set -o errexit # Can't Install on Proxmox or Alpine
set -o errtrace if command -v pveversion >/dev/null 2>&1; then
set -o nounset echo -e " Can't Install on Proxmox "
set -o pipefail exit
shopt -s expand_aliases fi
alias die='EXIT=$? LINE=$LINENO error_exit' if [ -e /etc/alpine-release ]; then
trap die ERR echo -e " Can't Install on Alpine"
exit
fi
while true; do
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
case $yn in
[Yy]*) break ;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
done
# ----------------------installing---------------------------------
echo "Installing Dependencies" echo "Installing Dependencies"
apt update &>/dev/null apt update &>/dev/null
apt install -y curl &>/dev/null apt install -y curl &>/dev/null

75
docker_portainer.sh Normal file
View File

@@ -0,0 +1,75 @@
#!/bin/bash
function header_info {
echo
echo -e " ${DGN}${APP}${CL}"
echo
}
APP="Docker and Portainer"
hostname="$(hostname)"
IP=$(hostname -I | awk '{print $1}')
YW=$(echo "\033[33m")
BL=$(echo "\033[36m")
RD=$(echo "\033[01;31m")
BGN=$(echo "\033[4;92m")
GN=$(echo "\033[1;92m")
DGN=$(echo "\033[32m")
CL=$(echo "\033[m")
# print overwrite message
BFR="\\r\\033[K"
HOLD="-"
CM="${GN}✓${CL}"
CN="${RD}✗${CL}"
# show header info
header_info
# Can't Install on Proxmox or Alpine
if command -v pveversion >/dev/null 2>&1; then
echo -e " Can't Install on Proxmox "
exit
fi
if [ -e /etc/alpine-release ]; then
echo -e " Can't Install on Alpine"
exit
fi
while true; do
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
case $yn in
[Yy]*) break ;;
[Nn]*) kill -INT $$ ;;
*) echo "Please answer yes or no." ;;
esac
done
# ----------------------installing---------------------------------
echo "Installing updates"
apt update &>/dev/null
echo "Installed updates"
if command -v docker &> /dev/null; then
echo -e "${CM} Docker is installed"
else
echo -e "${CN} Docker is not installed"
apt-get install docker.io -y &>/dev/null
echo -e "${CM} Docker is installed"
fi
CONTAINER=portainer
if [ "$(docker ps -a -q -f name=^/${CONTAINER}$)" ]; then
echo -e "${CM} $CONTAINER exists"
else
echo -e "${CN} '$CONTAINER' does not exist, creating it now"
docker volume create portainer_data &>/dev/null
docker run -d \
-p 8000:8000 \
-p 9443:9443 \
--name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest &>/dev/null
echo -e "${BFR}${BFR}${CM} $CONTAINER installed"
echo -e "Portainer should be reachable by going to the following URL.
${BL}https://$IP:9443${CL} \n"
fi

View File

@@ -1,11 +1,46 @@
#!/bin/bash #!/bin/bash
function header_info {
echo
echo -e " ${DGN}${APP}${CL}"
echo
}
APP="Coder Code Server"
hostname="$(hostname)"
IP=$(hostname -I | awk '{print $1}')
YW=$(echo "\033[33m")
BL=$(echo "\033[36m")
RD=$(echo "\033[01;31m")
BGN=$(echo "\033[4;92m")
GN=$(echo "\033[1;92m")
DGN=$(echo "\033[32m")
CL=$(echo "\033[m")
# print overwrite message
BFR="\\r\\033[K"
HOLD="-"
CM="${GN}✓${CL}"
# show header info
header_info
# Can't Install on Proxmox or Alpine
if command -v pveversion >/dev/null 2>&1; then if command -v pveversion >/dev/null 2>&1; then
echo -e "⚠️ Can't Install on Proxmox " echo -e " Can't Install on Proxmox "
exit exit
fi fi
if [ -e /etc/alpine-release ]; then
echo -e " Can't Install on Alpine"
exit
fi
while true; do
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
case $yn in
[Yy]*) break ;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
done
header_info echo -e "${BL}Ready yo install ${APP} on $hostname${CL}"
echo bye