mirror of
https://github.com/ej52/proxmox-scripts.git
synced 2025-11-23 17:30:27 +01:00
fix: remove source from install script
This commit is contained in:
@@ -17,10 +17,13 @@ source <(wget --no-cache -qO- ${EPS_BASE_URL}/utils/${EPS_OS_DISTRO}.sh)
|
|||||||
|
|
||||||
pms_bootstrap
|
pms_bootstrap
|
||||||
pms_settraps
|
pms_settraps
|
||||||
|
|
||||||
if [ $EPS_CT_INSTALL = false ]; then
|
if [ $EPS_CT_INSTALL = false ]; then
|
||||||
pms_header
|
pms_header
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pms_check_os
|
||||||
|
|
||||||
EPS_OS_ARCH=$(os_arch)
|
EPS_OS_ARCH=$(os_arch)
|
||||||
EPS_OS_CODENAME=$(os_codename)
|
EPS_OS_CODENAME=$(os_codename)
|
||||||
EPS_OS_VERSION=${EPS_OS_VERSION:-$(os_version)}
|
EPS_OS_VERSION=${EPS_OS_VERSION:-$(os_version)}
|
||||||
|
|||||||
31
install.sh
31
install.sh
@@ -2,8 +2,15 @@
|
|||||||
export EPS_BASE_URL=https://raw.githubusercontent.com/ej52/proxmox-scripts/main
|
export EPS_BASE_URL=https://raw.githubusercontent.com/ej52/proxmox-scripts/main
|
||||||
export EPS_CT_INSTALL=false
|
export EPS_CT_INSTALL=false
|
||||||
|
|
||||||
export EPS_UTILS=$(wget --no-cache -qO- $EPS_BASE_URL/utils/common.sh)
|
CLR_RD="\033[0;31m"
|
||||||
source <(echo -n "$EPS_UTILS")
|
CLR_RDB="\033[1;31m"
|
||||||
|
CLR_CYB="\033[1;36m"
|
||||||
|
CLR="\033[m"
|
||||||
|
|
||||||
|
log_error () {
|
||||||
|
printf "${CLR_RDB}✘ ${CLR_RD}$1${CLR}\n"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -14,7 +21,7 @@ while [ "$#" -gt 0 ]; do
|
|||||||
EPS_CLEANUP=true
|
EPS_CLEANUP=true
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
log "error" "Unrecognized option: ${CLR_CYB}$1${CLR}" "" 1;;
|
log_error "Unrecognized option: ${CLR_CYB}$1${CLR}";;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
@@ -23,30 +30,30 @@ EPS_APP_NAME=${EPS_APP_NAME:-}
|
|||||||
export EPS_CLEANUP=${EPS_CLEANUP:-false}
|
export EPS_CLEANUP=${EPS_CLEANUP:-false}
|
||||||
|
|
||||||
if [ -z "$EPS_APP_NAME" ]; then
|
if [ -z "$EPS_APP_NAME" ]; then
|
||||||
log "error" "No application provided" "" 1
|
log_error "No application provided"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export EPS_APP_CONFIG=$(wget --no-cache -qO- $EPS_BASE_URL/apps/$EPS_APP_NAME/config.sh)
|
export EPS_APP_CONFIG=$(wget --no-cache -qO- $EPS_BASE_URL/apps/$EPS_APP_NAME/config.sh)
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
log "error" "No config found for ${CLR_CYB}$EPS_APP_NAME${CLR}" "" 1
|
log_error "No config found for ${CLR_CYB}$EPS_APP_NAME${CLR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EPS_APP_INSTALL=$(wget --no-cache -qO- $EPS_BASE_URL/apps/$EPS_APP_NAME/install.sh)
|
EPS_APP_INSTALL=$(wget --no-cache -qO- $EPS_BASE_URL/apps/$EPS_APP_NAME/install.sh)
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
log "error" "No install script found for ${CLR_CYB}$EPS_APP_NAME${CLR}" "" 1
|
log_error "No install script found for ${CLR_CYB}$EPS_APP_NAME${CLR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EPS_OS_NAME=$(os_name)
|
EPS_OS_NAME=$(uname)
|
||||||
export EPS_OS_DISTRO=$(os_distro)
|
export EPS_OS_DISTRO=$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)
|
||||||
|
|
||||||
source <(echo -n "$EPS_APP_CONFIG")
|
if [ "$EPS_OS_NAME" != "Linux" ]; then
|
||||||
pms_header
|
log_error "OS not supported: ${CLR_CYB}$EPS_OS_NAME${CLR}"
|
||||||
pms_check_os
|
fi
|
||||||
|
|
||||||
if [ "$EPS_OS_DISTRO" = "alpine" ]; then
|
if [ "$EPS_OS_DISTRO" = "alpine" ]; then
|
||||||
[ "$(command -v bash)" ] || apk add bash >/dev/null
|
[ "$(command -v bash)" ] || apk add bash >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap - ERR
|
export EPS_UTILS=$(wget --no-cache -qO- $EPS_BASE_URL/utils/common.sh)
|
||||||
bash -c "$EPS_APP_INSTALL"
|
bash -c "$EPS_APP_INSTALL"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user