mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 10:55:10 +00:00
Set up testing.
This commit is contained in:
parent
87f9db5862
commit
f53e702cd9
12
ct/ghost.sh
12
ct/ghost.sh
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1090
|
||||
source <(curl -s https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/heads/ghost/misc/build.func)
|
||||
source <(curl -s https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/heads/ghost-testing/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: fabrice1236
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@ -52,5 +52,15 @@ start
|
||||
build_container
|
||||
description
|
||||
|
||||
# Ensure the container is created before starting it
|
||||
if pct status "$CT_ID" &>/dev/null; then
|
||||
msg_info "Starting LXC Container"
|
||||
pct start "$CT_ID"
|
||||
msg_ok "Started LXC Container"
|
||||
else
|
||||
msg_error "Failed to create LXC Container"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
@ -788,9 +788,9 @@ build_container() {
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd $TEMP_DIR >/dev/null
|
||||
if [ "$var_os" == "alpine" ]; then
|
||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/head/ghost/misc/alpine-install.func)"
|
||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/heads/ghost-testing/misc/alpine-install.func)"
|
||||
else
|
||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/head/ghost/misc/install.func)"
|
||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/heads/ghost-testing/misc/install.func)"
|
||||
fi
|
||||
export CACHER="$APT_CACHER"
|
||||
export CACHER_IP="$APT_CACHER_IP"
|
||||
@ -820,7 +820,13 @@ build_container() {
|
||||
$PW
|
||||
"
|
||||
# This executes create_lxc.sh and creates the container and .conf file
|
||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/head/ghost/ct/create_lxc.sh)" || exit
|
||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/heads/ghost-testing/ct/create_lxc.sh)" || exit
|
||||
|
||||
# Ensure the container configuration file is created
|
||||
if [ ! -f "/etc/pve/lxc/${CTID}.conf" ]; then
|
||||
msg_error "Failed to create LXC Container configuration file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
||||
if [ "$CT_TYPE" == "0" ]; then
|
||||
@ -882,7 +888,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
||||
EOF'
|
||||
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
||||
fi
|
||||
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/head/ghost/install/$var_install.sh)" || exit
|
||||
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/heads/ghost-testing/install/$var_install.sh)" || exit
|
||||
|
||||
}
|
||||
|
||||
@ -894,7 +900,7 @@ description() {
|
||||
DESCRIPTION=$(cat <<EOF
|
||||
<div align='center'>
|
||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||
<img src='https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/head/ghost/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||
<img src='https://raw.githubusercontent.com/fabrice1236/ProxmoxVE/refs/heads/ghost-testing/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||
</a>
|
||||
|
||||
<h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2>
|
||||
|
@ -253,6 +253,6 @@ EOF
|
||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||
msg_ok "Customized Container"
|
||||
fi
|
||||
echo "bash -c \"\$(wget -qLO - https://github.com/fabrice1236/ProxmoxVE/raw/ghost/ct/${app}.sh)\"" >/usr/bin/update
|
||||
echo "bash -c \"\$(wget -qLO - https://github.com/fabrice1236/ProxmoxVE/raw/ghost-testing/ct/${app}.sh)\"" >/usr/bin/update
|
||||
chmod +x /usr/bin/update
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user