mirror of https://github.com/tteck/Proxmox.git
finished script working :)
checked everything double/triple
This commit is contained in:
parent
f452f339f4
commit
f79bc3c7aa
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -s https://raw.githubusercontent.com/nicedevil007/Proxmox/main/misc/build.func)
|
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2023 nicedevil007
|
# Copyright (c) 2021-2023 tteck
|
||||||
# Author: nicedevil007 (nicedevil007ster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/nicedevil007/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2023 nicedevil007
|
# Copyright (c) 2021-2023 tteck
|
||||||
# Author: nicedevil007 (nicedevil007ster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/nicedevil007/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
|
|
||||||
color
|
color
|
||||||
|
|
|
@ -118,7 +118,7 @@ default_packages() {
|
||||||
|
|
||||||
motd_ssh() {
|
motd_ssh() {
|
||||||
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||||
echo -e "$APPLICATION LXC provided by https://nicedevil007.github.io/Proxmox/\n" >/etc/motd
|
echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd
|
||||||
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
||||||
$STD rc-update add sshd
|
$STD rc-update add sshd
|
||||||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
||||||
|
|
|
@ -400,9 +400,9 @@ build_container() {
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd $TEMP_DIR >/dev/null
|
pushd $TEMP_DIR >/dev/null
|
||||||
if [ "$var_os" == "alpine" ]; then
|
if [ "$var_os" == "alpine" ]; then
|
||||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/nicedevil007/Proxmox/main/misc/alpine-install.func)"
|
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)"
|
||||||
else
|
else
|
||||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/nicedevil007/Proxmox/main/misc/install.func)"
|
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)"
|
||||||
fi
|
fi
|
||||||
export tz="$timezone"
|
export tz="$timezone"
|
||||||
if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then
|
if [[ "$APP" == "Docker" || "$APP" == "Umbrel" || "$APP" == "CasaOS" || "$APP" == "Home Assistant" ]]; then
|
||||||
|
@ -428,7 +428,7 @@ build_container() {
|
||||||
-unprivileged $CT_TYPE
|
-unprivileged $CT_TYPE
|
||||||
$PW
|
$PW
|
||||||
"
|
"
|
||||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/nicedevil007/Proxmox/main/ct/create_lxc.sh)" || exit
|
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit
|
||||||
|
|
||||||
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
||||||
if [ "$CT_TYPE" == "0" ]; then
|
if [ "$CT_TYPE" == "0" ]; then
|
||||||
|
@ -469,13 +469,13 @@ EOF
|
||||||
sleep 2
|
sleep 2
|
||||||
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
||||||
fi
|
fi
|
||||||
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/nicedevil007/Proxmox/main/install/$var_install.sh)" || exit
|
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
description() {
|
description() {
|
||||||
IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
pct set "$CTID" -description "# ${APP} LXC
|
pct set "$CTID" -description "# ${APP} LXC
|
||||||
### https://nicedevil007.github.io/Proxmox/
|
### https://tteck.github.io/Proxmox/
|
||||||
<a href='https://ko-fi.com/D1D7EP4GF'><img src='https://img.shields.io/badge/☕-Buy me a coffee-red' /></a>"
|
<a href='https://ko-fi.com/D1D7EP4GF'><img src='https://img.shields.io/badge/☕-Buy me a coffee-red' /></a>"
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ update_os() {
|
||||||
|
|
||||||
motd_ssh() {
|
motd_ssh() {
|
||||||
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||||
echo -e "$APPLICATION LXC provided by https://nicedevil007.github.io/Proxmox/\n" >/etc/motd
|
echo -e "$APPLICATION LXC provided by https://tteck.github.io/Proxmox/\n" >/etc/motd
|
||||||
chmod -x /etc/update-motd.d/*
|
chmod -x /etc/update-motd.d/*
|
||||||
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
||||||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
||||||
|
|
Loading…
Reference in New Issue