Use curl instead of wget
This commit is contained in:
parent
6c199a2307
commit
9d0b930db8
@ -48,9 +48,9 @@ jobs:
|
||||
id: create_message
|
||||
run: |
|
||||
VAR="The ${{ env.TITLE }} script is ready for testing:\n"
|
||||
VAR+="\`\`\`bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${{ env.TITLE }}.sh)\"\`\`\`\n"
|
||||
VAR+="\`\`\`bash -c \"\$(curl -fsSL - https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${{ env.TITLE }}.sh)\"\`\`\`\n"
|
||||
if [[ " ${EXISTING_FILES[@]} " =~ " frontend/public/json/${TITLE}.json " ]]; then
|
||||
JSON=$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/frontend/public/json/${{ env.TITLE }}.json)
|
||||
JSON=$(curl -fsSL - https://github.com/community-scripts/ProxmoxVED/raw/main/frontend/public/json/${{ env.TITLE }}.json)
|
||||
username=$(echo "$JSON" | jq -r '.default_credentials.username')
|
||||
password=$(echo "$JSON" | jq -r '.default_credentials.password')
|
||||
mapfile -t notes_array < <(echo "$JSON" | jq -r '.notes[].text')
|
||||
|
@ -184,7 +184,7 @@ build_container() {
|
||||
echo "Container ID: $CTID"
|
||||
|
||||
# This executes create_lxc.sh and creates the container and .conf file
|
||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/.github/workflows/scripts/app-test/pr-create-lxc.sh)"
|
||||
bash -c "$(curl -fsSL - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/.github/workflows/scripts/app-test/pr-create-lxc.sh)"
|
||||
|
||||
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
||||
if [ "$CT_TYPE" == "0" ]; then
|
||||
|
@ -20,46 +20,46 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/documenso ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop documenso
|
||||
msg_ok "${APP} Stopped"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cp /opt/documenso/.env /opt/
|
||||
rm -R /opt/documenso
|
||||
wget -q "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv documenso-${RELEASE} /opt/documenso
|
||||
cd /opt/documenso
|
||||
mv /opt/.env /opt/documenso/.env
|
||||
npm install &>/dev/null
|
||||
npm run build:web &>/dev/null
|
||||
npm run prisma:migrate-deploy &>/dev/null
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start documenso
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf v${RELEASE}.zip
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/documenso ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop documenso
|
||||
msg_ok "${APP} Stopped"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cp /opt/documenso/.env /opt/
|
||||
rm -R /opt/documenso
|
||||
curl -fsSL "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv documenso-${RELEASE} /opt/documenso
|
||||
cd /opt/documenso
|
||||
mv /opt/.env /opt/documenso/.env
|
||||
npm install &>/dev/null
|
||||
npm run build:web &>/dev/null
|
||||
npm run prisma:migrate-deploy &>/dev/null
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start documenso
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf v${RELEASE}.zip
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -21,46 +21,46 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/hoodik ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/hudikhq/hoodik/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop hoodik
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
if [ -d hoodik_bak ]; then
|
||||
rm -rf hoodik_bak
|
||||
fi
|
||||
mv hoodik hoodik_bak
|
||||
wget -q "https://github.com/hudikhq/hoodik/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q ${RELEASE}.zip
|
||||
mv hoodik-${RELEASE} /opt/hoodik
|
||||
cd /opt/hoodik
|
||||
cargo update -q
|
||||
cargo build -q --release
|
||||
msg_ok "Updated Hoodik"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start hoodik
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -R /opt/${RELEASE}.zip
|
||||
rm -R /opt/hoodik_bak
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/hoodik ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/hudikhq/hoodik/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop hoodik
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
if [ -d hoodik_bak ]; then
|
||||
rm -rf hoodik_bak
|
||||
fi
|
||||
mv hoodik hoodik_bak
|
||||
curl -fsSL "https://github.com/hudikhq/hoodik/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q ${RELEASE}.zip
|
||||
mv hoodik-${RELEASE} /opt/hoodik
|
||||
cd /opt/hoodik
|
||||
cargo update -q
|
||||
cargo build -q --release
|
||||
msg_ok "Updated Hoodik"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start hoodik
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -R /opt/${RELEASE}.zip
|
||||
rm -R /opt/hoodik_bak
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -24,45 +24,45 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/koel ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/koel/koel/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping ${APP} Service"
|
||||
systemctl stop nginx
|
||||
msg_ok "Stopped ${APP} Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
wget -q https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
|
||||
unzip -q koel-${RELEASE}.zip
|
||||
cd /opt/koel
|
||||
composer update --no-interaction >/dev/null 2>&1
|
||||
composer install --no-interaction >/dev/null 2>&1
|
||||
php artisan migrate --force >/dev/null 2>&1
|
||||
php artisan cache:clear >/dev/null 2>&1
|
||||
php artisan config:clear >/dev/null 2>&1
|
||||
php artisan view:clear >/dev/null 2>&1
|
||||
php artisan koel:init --no-interaction >/dev/null 2>&1
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP} Service"
|
||||
systemctl start nginx
|
||||
msg_ok "Started ${APP} Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/koel-${RELEASE}.zip
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully!\n"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/koel ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/koel/koel/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping ${APP} Service"
|
||||
systemctl stop nginx
|
||||
msg_ok "Stopped ${APP} Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
|
||||
unzip -q koel-${RELEASE}.zip
|
||||
cd /opt/koel
|
||||
composer update --no-interaction >/dev/null 2>&1
|
||||
composer install --no-interaction >/dev/null 2>&1
|
||||
php artisan migrate --force >/dev/null 2>&1
|
||||
php artisan cache:clear >/dev/null 2>&1
|
||||
php artisan config:clear >/dev/null 2>&1
|
||||
php artisan view:clear >/dev/null 2>&1
|
||||
php artisan koel:init --no-interaction >/dev/null 2>&1
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP} Service"
|
||||
systemctl start nginx
|
||||
msg_ok "Started ${APP} Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/koel-${RELEASE}.zip
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully!\n"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -36,7 +36,7 @@ function update_script() {
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
mv /opt/maxun /opt/maxun_bak
|
||||
cd /opt
|
||||
wget -q "https://github.com/getmaxun/maxun/archive/refs/tags/v${RELEASE}.zip"
|
||||
curl -fsSL "https://github.com/getmaxun/maxun/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv maxun-${RELEASE} /opt/maxun
|
||||
mv /opt/maxun_bak/.env /opt/maxun/
|
||||
|
@ -27,7 +27,7 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if ! command -v pnpm &> /dev/null; then
|
||||
if ! command -v pnpm &>/dev/null; then
|
||||
msg_info "Installing pnpm"
|
||||
#export NODE_OPTIONS=--openssl-legacy-provider
|
||||
$STD npm install -g pnpm@8.15
|
||||
@ -51,7 +51,7 @@ function update_script() {
|
||||
msg_ok "Cleaned Old Files"
|
||||
|
||||
msg_info "Downloading NPM v${RELEASE}"
|
||||
wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz
|
||||
curl -fsSL https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz
|
||||
cd nginx-proxy-manager-${RELEASE}
|
||||
msg_ok "Downloaded NPM v${RELEASE}"
|
||||
|
||||
|
@ -19,22 +19,21 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/pixelfed ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/xxxx/xxxx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
wget -q
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/pixelfed ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/xxxx/xxxx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -20,39 +20,39 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/roundcubemail ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if (($(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80)); then
|
||||
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
|
||||
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/roundcube/roundcubemail/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
wget -q "https://github.com/roundcube/roundcubemail/releases/download/${RELEASE}/roundcubemail-${RELEASE}-complete.tar.gz"
|
||||
tar -xf roundcubemail-${RELEASE}-complete.tar.gz
|
||||
mv roundcubemail-${RELEASE} /opt/roundcubemail
|
||||
cd /opt/roundcubemail
|
||||
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev
|
||||
chown -R www-data:www-data temp/ logs/
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Reload Apache2"
|
||||
systemctl reload apache2
|
||||
msg_ok "Apache2 Reloaded"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/roundcubemail-${RELEASE}-complete.tar.gz
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
header_info
|
||||
if [[ ! -d /opt/roundcubemail ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if (($(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80)); then
|
||||
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
|
||||
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/roundcube/roundcubemail/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
curl -fsSL "https://github.com/roundcube/roundcubemail/releases/download/${RELEASE}/roundcubemail-${RELEASE}-complete.tar.gz"
|
||||
tar -xf roundcubemail-${RELEASE}-complete.tar.gz
|
||||
mv roundcubemail-${RELEASE} /opt/roundcubemail
|
||||
cd /opt/roundcubemail
|
||||
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev
|
||||
chown -R www-data:www-data temp/ logs/
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Reload Apache2"
|
||||
systemctl reload apache2
|
||||
msg_ok "Apache2 Reloaded"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/roundcubemail-${RELEASE}-complete.tar.gz
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -20,58 +20,58 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/cwa ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/crocodilestick/Calibre-Web-Automated/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop cps cwa-autolibrary cwa-ingester cwa-change-detector cwa-autozip.timer
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
$STD tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/cwa /opt/calibre-web/metadata.db
|
||||
msg_ok "Backup Created"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
cd /opt/kepubify
|
||||
rm -rf kepubify-linux-64bit
|
||||
curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit
|
||||
chmod +x kepubify-linux-64bit
|
||||
cd /opt/calibre-web
|
||||
$STD pip install --upgrade calibreweb[goodreads,metadata,kobo]
|
||||
cd /opt/cwa
|
||||
$STD git stash --all
|
||||
$STD git pull
|
||||
$STD pip install -r requirements.txt
|
||||
wget -q https://gist.githubusercontent.com/vhsdream/2e81afeff139c5746db1ede88c01cc7b/raw/51238206e87aec6c0abeccce85dec9f2b0c89000/proxmox-lxc.patch -O /opt/cwa.patch # not for production
|
||||
$STD git apply --whitespace=fix /opt/cwa.patch # not for production
|
||||
cp -r /opt/cwa/root/app/calibre-web/cps/* /usr/local/lib/python3*/dist-packages/calibreweb/cps
|
||||
cd scripts
|
||||
chmod +x check-cwa-services.sh ingest-service.sh change-detector.sh
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
systemctl start cps cwa-autolibrary cwa-ingester cwa-change-detector cwa-autozip.timer
|
||||
msg_ok "Started $APP"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/cwa.patch
|
||||
rm -rf "/opt/${APP}_backup_$(date +%F).tar.gz"
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
if [[ ! -d /opt/cwa ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/crocodilestick/Calibre-Web-Automated/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop cps cwa-autolibrary cwa-ingester cwa-change-detector cwa-autozip.timer
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
$STD tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/cwa /opt/calibre-web/metadata.db
|
||||
msg_ok "Backup Created"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
cd /opt/kepubify
|
||||
rm -rf kepubify-linux-64bit
|
||||
curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit
|
||||
chmod +x kepubify-linux-64bit
|
||||
cd /opt/calibre-web
|
||||
$STD pip install --upgrade calibreweb[goodreads,metadata,kobo]
|
||||
cd /opt/cwa
|
||||
$STD git stash --all
|
||||
$STD git pull
|
||||
$STD pip install -r requirements.txt
|
||||
curl -fsSL https://gist.githubusercontent.com/vhsdream/2e81afeff139c5746db1ede88c01cc7b/raw/51238206e87aec6c0abeccce85dec9f2b0c89000/proxmox-lxc.patch -O /opt/cwa.patch # not for production
|
||||
$STD git apply --whitespace=fix /opt/cwa.patch # not for production
|
||||
cp -r /opt/cwa/root/app/calibre-web/cps/* /usr/local/lib/python3*/dist-packages/calibreweb/cps
|
||||
cd scripts
|
||||
chmod +x check-cwa-services.sh ingest-service.sh change-detector.sh
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
systemctl start cps cwa-autolibrary cwa-ingester cwa-change-detector cwa-autozip.timer
|
||||
msg_ok "Started $APP"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/cwa.patch
|
||||
rm -rf "/opt/${APP}_backup_$(date +%F).tar.gz"
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -20,47 +20,47 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/fileflows ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
update_available=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
|
||||
if [[ "${update_available}" == "true" ]]; then
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop fileflows
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
|
||||
tar -czf $backup_filename -C /opt/fileflows Data
|
||||
msg_ok "Backup Created"
|
||||
|
||||
msg_info "Updating $APP to latest version"
|
||||
temp_file=$(mktemp)
|
||||
wget -q https://fileflows.com/downloads/zip -O $temp_file
|
||||
unzip -oq -d /opt/fileflows $temp_file
|
||||
msg_ok "Updated $APP to latest version"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
systemctl start fileflows
|
||||
msg_ok "Started $APP"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf $temp_file
|
||||
rm -rf $backup_filename
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at latest version"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/fileflows ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
update_available=$(curl -s -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
|
||||
if [[ "${update_available}" == "true" ]]; then
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop fileflows
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
|
||||
tar -czf $backup_filename -C /opt/fileflows Data
|
||||
msg_ok "Backup Created"
|
||||
|
||||
msg_info "Updating $APP to latest version"
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL https://fileflows.com/downloads/zip -O $temp_file
|
||||
unzip -oq -d /opt/fileflows $temp_file
|
||||
msg_ok "Updated $APP to latest version"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
systemctl start fileflows
|
||||
msg_ok "Started $APP"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf $temp_file
|
||||
rm -rf $backup_filename
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at latest version"
|
||||
fi
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -20,69 +20,69 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /opt/meilisearch_version.txt ]]; then
|
||||
msg_error "No Meilisearch Installation Found!"
|
||||
exit
|
||||
if [[ ! -f /opt/meilisearch_version.txt ]]; then
|
||||
msg_error "No Meilisearch Installation Found!"
|
||||
exit
|
||||
fi
|
||||
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Meilisearch Update" --radiolist --cancel-button Exit-Script "Spacebar = Select" 10 58 2 \
|
||||
"1" "Update Meilisearch" ON \
|
||||
"2" "Update Meilisearch-UI" OFF \
|
||||
3>&1 1>&2 2>&3)
|
||||
|
||||
if [ "$UPD" == "1" ]; then
|
||||
msg_info "Stopping Meilisearch"
|
||||
systemctl stop meilisearch
|
||||
msg_ok "Stopped Meilisearch"
|
||||
|
||||
msg_info "Updating Meilisearch"
|
||||
tmp_file=$(mktemp)
|
||||
RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -O $tmp_file
|
||||
$STD dpkg -i $tmp_file
|
||||
echo "$RELEASE" >/opt/meilisearch_version.txt
|
||||
msg_ok "Updated Meilisearch"
|
||||
|
||||
msg_info "Starting Meilisearch"
|
||||
systemctl start meilisearch
|
||||
msg_ok "Started Meilisearch"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$UPD" == "2" ]; then
|
||||
if [[ ! -f /opt/meilisearch-ui_version.txt ]]; then
|
||||
msg_error "No Meilisearch-UI Installation Found!"
|
||||
exit
|
||||
fi
|
||||
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Meilisearch Update" --radiolist --cancel-button Exit-Script "Spacebar = Select" 10 58 2 \
|
||||
"1" "Update Meilisearch" ON \
|
||||
"2" "Update Meilisearch-UI" OFF \
|
||||
3>&1 1>&2 2>&3)
|
||||
msg_info "Stopping Meilisearch-UI"
|
||||
systemctl stop meilisearch-ui
|
||||
msg_ok "Stopped Meilisearch-UI"
|
||||
|
||||
if [ "$UPD" == "1" ]; then
|
||||
msg_info "Stopping Meilisearch"
|
||||
systemctl stop meilisearch
|
||||
msg_ok "Stopped Meilisearch"
|
||||
msg_info "Updating Meilisearch-UI"
|
||||
tmp_file=$(mktemp)
|
||||
tmp_dir=$(mktemp -d)
|
||||
RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
cp /opt/meilisearch-ui/.env.local /tmp/.env.local.bak
|
||||
rm -rf /opt/meilisearch-ui
|
||||
mkdir -p /opt/meilisearch-ui
|
||||
curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -O $tmp_file
|
||||
unzip -q "$tmp_file" -d "$tmp_dir"
|
||||
mv "$tmp_dir"/*/* /opt/meilisearch-ui/
|
||||
cd /opt/meilisearch-ui
|
||||
sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts
|
||||
mv /tmp/.env.local.bak /opt/meilisearch-ui/.env.local
|
||||
$STD pnpm install
|
||||
echo "$RELEASE_UI" >/opt/meilisearch-ui_version.txt
|
||||
msg_ok "Updated Meilisearch-UI"
|
||||
|
||||
msg_info "Updating Meilisearch"
|
||||
tmp_file=$(mktemp)
|
||||
RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -O $tmp_file
|
||||
$STD dpkg -i $tmp_file
|
||||
echo "$RELEASE" >/opt/meilisearch_version.txt
|
||||
msg_ok "Updated Meilisearch"
|
||||
|
||||
msg_info "Starting Meilisearch"
|
||||
systemctl start meilisearch
|
||||
msg_ok "Started Meilisearch"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$UPD" == "2" ]; then
|
||||
if [[ ! -f /opt/meilisearch-ui_version.txt ]]; then
|
||||
msg_error "No Meilisearch-UI Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Stopping Meilisearch-UI"
|
||||
systemctl stop meilisearch-ui
|
||||
msg_ok "Stopped Meilisearch-UI"
|
||||
|
||||
msg_info "Updating Meilisearch-UI"
|
||||
tmp_file=$(mktemp)
|
||||
tmp_dir=$(mktemp -d)
|
||||
RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
cp /opt/meilisearch-ui/.env.local /tmp/.env.local.bak
|
||||
rm -rf /opt/meilisearch-ui
|
||||
mkdir -p /opt/meilisearch-ui
|
||||
wget -q "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -O $tmp_file
|
||||
unzip -q "$tmp_file" -d "$tmp_dir"
|
||||
mv "$tmp_dir"/*/* /opt/meilisearch-ui/
|
||||
cd /opt/meilisearch-ui
|
||||
sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts
|
||||
mv /tmp/.env.local.bak /opt/meilisearch-ui/.env.local
|
||||
$STD pnpm install
|
||||
echo "$RELEASE_UI" >/opt/meilisearch-ui_version.txt
|
||||
msg_ok "Updated Meilisearch-UI"
|
||||
|
||||
msg_info "Starting Meilisearch-UI"
|
||||
systemctl start meilisearch-ui
|
||||
msg_ok "Started Meilisearch-UI"
|
||||
exit
|
||||
fi
|
||||
msg_info "Starting Meilisearch-UI"
|
||||
systemctl start meilisearch-ui
|
||||
msg_ok "Started Meilisearch-UI"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -20,44 +20,44 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
touch /opt/${APP}_version.txt
|
||||
mkdir -p $HOME/.config/qBittorrent/
|
||||
mkdir -p /opt/qbittorrent/
|
||||
mv /.config/qBittorrent $HOME/.config/
|
||||
$STD apt-get remove --purge -y qbittorrent-nox
|
||||
sed -i 's@ExecStart=/usr/bin/qbittorrent-nox@ExecStart=/opt/qbittorrent/qbittorrent-nox@g' /etc/systemd/system/qbittorrent-nox.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
RELEASE=$(echo $FULLRELEASE | cut -c 9-13)
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop qbittorrent-nox
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
rm -f /opt/qbittorrent/qbittorrent-nox
|
||||
wget -q "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox" -O /opt/qbittorrent/qbittorrent-nox
|
||||
chmod +x /opt/qbittorrent/qbittorrent-nox
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start qbittorrent-nox
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
touch /opt/${APP}_version.txt
|
||||
mkdir -p $HOME/.config/qBittorrent/
|
||||
mkdir -p /opt/qbittorrent/
|
||||
mv /.config/qBittorrent $HOME/.config/
|
||||
$STD apt-get remove --purge -y qbittorrent-nox
|
||||
sed -i 's@ExecStart=/usr/bin/qbittorrent-nox@ExecStart=/opt/qbittorrent/qbittorrent-nox@g' /etc/systemd/system/qbittorrent-nox.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
RELEASE=$(echo $FULLRELEASE | cut -c 9-13)
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop qbittorrent-nox
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
rm -f /opt/qbittorrent/qbittorrent-nox
|
||||
curl -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox" -O /opt/qbittorrent/qbittorrent-nox
|
||||
chmod +x /opt/qbittorrent/qbittorrent-nox
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start qbittorrent-nox
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
92
ct/slskd.sh
92
ct/slskd.sh
@ -20,54 +20,54 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/slskd ]] || [[ ! -d /opt/soularr ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
msg_info "Stopping $APP and Soularr"
|
||||
systemctl stop slskd soularr.timer soularr.service
|
||||
msg_ok "Stopped $APP and Soularr"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
tmp_file=$(mktemp)
|
||||
wget -q "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -O $tmp_file
|
||||
unzip -q -oj $tmp_file slskd -d /opt/${APP}
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Updating Soularr"
|
||||
cp /opt/soularr/config.ini /opt/config.ini.bak
|
||||
cp /opt/soularr/run.sh /opt/run.sh.bak
|
||||
cd /tmp
|
||||
rm -rf /opt/soularr
|
||||
wget -q https://github.com/mrusse/soularr/archive/refs/heads/main.zip
|
||||
unzip -q main.zip
|
||||
mv soularr-main /opt/soularr
|
||||
cd /opt/soularr
|
||||
$STD pip install -r requirements.txt
|
||||
mv /opt/config.ini.bak /opt/soularr/config.ini
|
||||
mv /opt/run.sh.bak /opt/soularr/run.sh
|
||||
msg_ok "Soularr updated"
|
||||
msg_info "Starting $APP and Soularr"
|
||||
systemctl start slskd soularr.timer
|
||||
msg_ok "Started $APP and Soularr"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf $tmp_file
|
||||
rm -rf /tmp/main.zip
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
if [[ ! -d /opt/slskd ]] || [[ ! -d /opt/soularr ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
msg_info "Stopping $APP and Soularr"
|
||||
systemctl stop slskd soularr.timer soularr.service
|
||||
msg_ok "Stopped $APP and Soularr"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
tmp_file=$(mktemp)
|
||||
curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -O $tmp_file
|
||||
unzip -q -oj $tmp_file slskd -d /opt/${APP}
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Updating Soularr"
|
||||
cp /opt/soularr/config.ini /opt/config.ini.bak
|
||||
cp /opt/soularr/run.sh /opt/run.sh.bak
|
||||
cd /tmp
|
||||
rm -rf /opt/soularr
|
||||
curl -fsSL https://github.com/mrusse/soularr/archive/refs/heads/main.zip
|
||||
unzip -q main.zip
|
||||
mv soularr-main /opt/soularr
|
||||
cd /opt/soularr
|
||||
$STD pip install -r requirements.txt
|
||||
mv /opt/config.ini.bak /opt/soularr/config.ini
|
||||
mv /opt/run.sh.bak /opt/soularr/run.sh
|
||||
msg_ok "Soularr updated"
|
||||
msg_info "Starting $APP and Soularr"
|
||||
systemctl start slskd soularr.timer
|
||||
msg_ok "Started $APP and Soularr"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf $tmp_file
|
||||
rm -rf /tmp/main.zip
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -189,7 +189,7 @@ Example with a Github Release:
|
||||
Example:
|
||||
|
||||
```bash
|
||||
wget -q
|
||||
curl -fsSL
|
||||
unzip -q
|
||||
```
|
||||
|
||||
|
@ -154,7 +154,7 @@ Example for a git release:
|
||||
|
||||
```bash
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
|
||||
curl -fsSL "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
|
||||
```
|
||||
|
||||
### 5.2 **Save the version for update checks**
|
||||
@ -192,7 +192,7 @@ msg_ok "Installed Dependencies"
|
||||
Example:
|
||||
|
||||
```bash
|
||||
wget -q
|
||||
curl -fsSL
|
||||
unzip -q
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
# Source: [SOURCE_URL]
|
||||
|
||||
# Import Functions und Setup
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
@ -34,11 +34,11 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "${APPLICATION} Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >> ~/$APP_NAME.creds
|
||||
echo "${APPLICATION} Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/$APP_NAME.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
# Temp
|
||||
@ -46,7 +46,7 @@ msg_ok "Set up Database"
|
||||
# Setup App
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/[REPO]/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q "https://github.com/[REPO]/archive/refs/tags/${RELEASE}.zip"
|
||||
curl -fsSL "https://github.com/[REPO]/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q ${RELEASE}.zip
|
||||
mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION}
|
||||
#
|
||||
|
@ -4,82 +4,82 @@ import { basePath } from "@/config/siteConfig";
|
||||
import { Script } from "@/lib/types";
|
||||
import { getDisplayValueFromType } from "../ScriptInfoBlocks";
|
||||
|
||||
const getInstallCommand = (scriptPath?: string, isAlpine = false) => {
|
||||
return `bash -c "$(wget -q${isAlpine ? "" : "L"}O - https://github.com/community-scripts/${basePath}/raw/main/${scriptPath})"`;
|
||||
const getInstallCommand = (scriptPath = "") => {
|
||||
return `bash -c "$(curl -fsSL https://github.com/community-scripts/${basePath}/raw/main/${scriptPath})"`;
|
||||
};
|
||||
|
||||
export default function InstallCommand({ item }: { item: Script }) {
|
||||
const alpineScript = item.install_methods.find(
|
||||
(method) => method.type === "alpine",
|
||||
);
|
||||
const alpineScript = item.install_methods.find(
|
||||
(method) => method.type === "alpine",
|
||||
);
|
||||
|
||||
const defaultScript = item.install_methods.find(
|
||||
(method) => method.type === "default",
|
||||
);
|
||||
const defaultScript = item.install_methods.find(
|
||||
(method) => method.type === "default",
|
||||
);
|
||||
|
||||
const renderInstructions = (isAlpine = false) => (
|
||||
<>
|
||||
<p className="text-sm mt-2">
|
||||
{isAlpine ? (
|
||||
<>
|
||||
As an alternative option, you can use Alpine Linux and the{" "}
|
||||
{item.name} package to create a {item.name}{" "}
|
||||
{getDisplayValueFromType(item.type)} container with faster creation
|
||||
time and minimal system resource usage. You are also obliged to
|
||||
adhere to updates provided by the package maintainer.
|
||||
</>
|
||||
) : item.type == "misc" ? (
|
||||
<>
|
||||
To use the {item.name} script, run the command below in the shell.
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{" "}
|
||||
To create a new Proxmox VE {item.name}{" "}
|
||||
{getDisplayValueFromType(item.type)}, run the command below in the
|
||||
Proxmox VE Shell.
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
{isAlpine && (
|
||||
<p className="mt-2 text-sm">
|
||||
To create a new Proxmox VE Alpine-{item.name}{" "}
|
||||
{getDisplayValueFromType(item.type)}, run the command below in the
|
||||
Proxmox VE Shell
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="p-4">
|
||||
{alpineScript ? (
|
||||
<Tabs defaultValue="default" className="mt-2 w-full max-w-4xl">
|
||||
<TabsList>
|
||||
<TabsTrigger value="default">Default</TabsTrigger>
|
||||
<TabsTrigger value="alpine">Alpine Linux</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="default">
|
||||
{renderInstructions()}
|
||||
<CodeCopyButton>
|
||||
{getInstallCommand(defaultScript?.script)}
|
||||
</CodeCopyButton>
|
||||
</TabsContent>
|
||||
<TabsContent value="alpine">
|
||||
{renderInstructions(true)}
|
||||
<CodeCopyButton>
|
||||
{getInstallCommand(alpineScript.script, true)}
|
||||
</CodeCopyButton>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
) : defaultScript?.script ? (
|
||||
const renderInstructions = (isAlpine = false) => (
|
||||
<>
|
||||
{renderInstructions()}
|
||||
<CodeCopyButton>
|
||||
{getInstallCommand(defaultScript.script)}
|
||||
</CodeCopyButton>
|
||||
<p className="text-sm mt-2">
|
||||
{isAlpine ? (
|
||||
<>
|
||||
As an alternative option, you can use Alpine Linux and the{" "}
|
||||
{item.name} package to create a {item.name}{" "}
|
||||
{getDisplayValueFromType(item.type)} container with faster creation
|
||||
time and minimal system resource usage. You are also obliged to
|
||||
adhere to updates provided by the package maintainer.
|
||||
</>
|
||||
) : item.type == "misc" ? (
|
||||
<>
|
||||
To use the {item.name} script, run the command below in the shell.
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{" "}
|
||||
To create a new Proxmox VE {item.name}{" "}
|
||||
{getDisplayValueFromType(item.type)}, run the command below in the
|
||||
Proxmox VE Shell.
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
{isAlpine && (
|
||||
<p className="mt-2 text-sm">
|
||||
To create a new Proxmox VE Alpine-{item.name}{" "}
|
||||
{getDisplayValueFromType(item.type)}, run the command below in the
|
||||
Proxmox VE Shell
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="p-4">
|
||||
{alpineScript ? (
|
||||
<Tabs defaultValue="default" className="mt-2 w-full max-w-4xl">
|
||||
<TabsList>
|
||||
<TabsTrigger value="default">Default</TabsTrigger>
|
||||
<TabsTrigger value="alpine">Alpine Linux</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="default">
|
||||
{renderInstructions()}
|
||||
<CodeCopyButton>
|
||||
{getInstallCommand(defaultScript?.script)}
|
||||
</CodeCopyButton>
|
||||
</TabsContent>
|
||||
<TabsContent value="alpine">
|
||||
{renderInstructions(true)}
|
||||
<CodeCopyButton>
|
||||
{getInstallCommand(alpineScript.script, true)}
|
||||
</CodeCopyButton>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
) : defaultScript?.script ? (
|
||||
<>
|
||||
{renderInstructions()}
|
||||
<CodeCopyButton>
|
||||
{getInstallCommand(defaultScript.script)}
|
||||
</CodeCopyButton>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ msg_info "Installing Calibre-Web (Patience)"
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
mkdir -p /opt/calibre-web
|
||||
$STD apt-get install -y calibre
|
||||
$STD wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web
|
||||
$STD curl -fsSL -o /opt/calibre-web/metadata.db https://github.com/janeczku/calibre-web/raw/master/library/metadata.db
|
||||
$STD pip install calibreweb[goodreads,metadata,kobo]
|
||||
$STD pip install jsonschema
|
||||
msg_ok "Installed Calibre-Web"
|
||||
@ -81,7 +81,7 @@ $STD git clone https://github.com/crocodilestick/Calibre-Web-Automated.git /opt/
|
||||
cd /opt/cwa
|
||||
$STD git checkout V${RELEASE}
|
||||
$STD pip install -r requirements.txt
|
||||
wget -q https://gist.githubusercontent.com/vhsdream/2e81afeff139c5746db1ede88c01cc7b/raw/51238206e87aec6c0abeccce85dec9f2b0c89000/proxmox-lxc.patch -O /opt/cwa.patch # not for production
|
||||
curl -fsSL https://gist.githubusercontent.com/vhsdream/2e81afeff139c5746db1ede88c01cc7b/raw/51238206e87aec6c0abeccce85dec9f2b0c89000/proxmox-lxc.patch -O /opt/cwa.patch # not for production
|
||||
$STD git apply --whitespace=fix /opt/cwa.patch # not for production
|
||||
cd scripts
|
||||
chmod +x check-cwa-services.sh ingest-service.sh change-detector.sh
|
||||
|
@ -15,26 +15,25 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y \
|
||||
unzip \
|
||||
htop \
|
||||
gnupg2 \
|
||||
ca-certificates \
|
||||
default-jdk \
|
||||
apt-transport-https \
|
||||
ghostscript \
|
||||
tesseract-ocr \
|
||||
tesseract-ocr-deu \
|
||||
tesseract-ocr-eng \
|
||||
unpaper \
|
||||
unoconv \
|
||||
wkhtmltopdf \
|
||||
ocrmypdf \
|
||||
wget \
|
||||
zip \
|
||||
curl \
|
||||
sudo \
|
||||
make \
|
||||
mc
|
||||
unzip \
|
||||
htop \
|
||||
gnupg2 \
|
||||
ca-certificates \
|
||||
default-jdk \
|
||||
apt-transport-https \
|
||||
ghostscript \
|
||||
tesseract-ocr \
|
||||
tesseract-ocr-deu \
|
||||
tesseract-ocr-eng \
|
||||
unpaper \
|
||||
unoconv \
|
||||
wkhtmltopdf \
|
||||
ocrmypdf \
|
||||
zip \
|
||||
curl \
|
||||
sudo \
|
||||
make \
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up PostgreSQL Repository"
|
||||
@ -54,27 +53,27 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8'
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||
{
|
||||
echo "Docspell-Credentials"
|
||||
echo "Docspell Database Name: $DB_NAME"
|
||||
echo "Docspell Database User: $DB_USER"
|
||||
echo "Docspell Database Password: $DB_PASS"
|
||||
echo "Docspell-Credentials"
|
||||
echo "Docspell Database Name: $DB_NAME"
|
||||
echo "Docspell Database User: $DB_USER"
|
||||
echo "Docspell Database Password: $DB_PASS"
|
||||
} >>~/docspell.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
msg_info "Setup Docspell (Patience)"
|
||||
mkdir -p /opt/docspell
|
||||
Docspell=$(wget -q https://github.com/eikek/docspell/releases/latest -O - | grep "title>Release" | cut -d " " -f 5)
|
||||
DocspellDSC=$(wget -q https://github.com/docspell/dsc/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
||||
Docspell=$(curl -fsSL https://github.com/eikek/docspell/releases/latest -O - | grep "title>Release" | cut -d " " -f 5)
|
||||
DocspellDSC=$(curl -fsSL https://github.com/docspell/dsc/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
||||
cd /opt
|
||||
wget -q https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb
|
||||
wget -q https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb
|
||||
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb
|
||||
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb
|
||||
$STD dpkg -i docspell-*.deb
|
||||
wget -q https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC}
|
||||
curl -fsSL https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC}
|
||||
mv dsc_amd* dsc
|
||||
chmod +x dsc
|
||||
mv dsc /usr/bin
|
||||
ln -s /etc/docspell-joex /opt/docspell/docspell-joex && ln -s /etc/docspell-restserver /opt/docspell/docspell-restserver && ln -s /usr/bin/dsc /opt/docspell/dsc
|
||||
wget -q https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
|
||||
curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
|
||||
chmod +x /usr/bin/yq
|
||||
JOEX_CONF="/usr/share/docspell-joex/conf/docspell-joex.conf"
|
||||
SERVER_CONF="/usr/share/docspell-restserver/conf/docspell-server.conf"
|
||||
@ -105,7 +104,7 @@ cd /opt/docspell
|
||||
SOLR_DOWNLOAD_URL="https://downloads.apache.org/lucene/solr/"
|
||||
latest_version=$(curl -s "$SOLR_DOWNLOAD_URL" | grep -oP '(?<=<a href=")[^"]+(?=/">[0-9])' | head -n 1)
|
||||
download_url="${SOLR_DOWNLOAD_URL}${latest_version}/solr-${latest_version}.tgz"
|
||||
wget -q "$download_url"
|
||||
curl -fsSL "$download_url"
|
||||
tar xzf "solr-$latest_version.tgz"
|
||||
$STD bash "/opt/docspell/solr-$latest_version/bin/install_solr_service.sh" "solr-$latest_version.tgz"
|
||||
mv /opt/solr /opt/docspell/solr
|
||||
|
@ -45,7 +45,7 @@ fi
|
||||
msg_ok "Installed and Set Up Intel Hardware Acceleration"
|
||||
|
||||
msg_info "Installing ASP.NET Core Runtime"
|
||||
wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
$STD dpkg -i packages-microsoft-prod.deb
|
||||
rm -rf packages-microsoft-prod.deb
|
||||
$STD apt-get update
|
||||
@ -56,7 +56,7 @@ msg_info "Setup ${APPLICATION}"
|
||||
$STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg
|
||||
$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe
|
||||
temp_file=$(mktemp)
|
||||
wget -q https://fileflows.com/downloads/zip -O $temp_file
|
||||
curl -fsSL https://fileflows.com/downloads/zip -O $temp_file
|
||||
unzip -q -d /opt/fileflows $temp_file
|
||||
(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
|
||||
systemctl enable -q --now fileflows.service
|
||||
|
@ -20,7 +20,6 @@ $STD apt-get install -y \
|
||||
mc \
|
||||
build-essential \
|
||||
git \
|
||||
wget \
|
||||
libnewt-dev \
|
||||
libssl-dev \
|
||||
libncurses5-dev \
|
||||
@ -79,7 +78,7 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Asterisk (Patience)"
|
||||
cd /usr/src
|
||||
wget -q http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21-current.tar.gz
|
||||
curl -fsSL http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21-current.tar.gz
|
||||
tar xf asterisk-21-current.tar.gz
|
||||
cd asterisk-21.*
|
||||
$STD contrib/scripts/get_mp3_source.sh
|
||||
@ -138,7 +137,7 @@ EOF
|
||||
|
||||
msg_info "Installing FreePBX"
|
||||
cd /usr/local/src
|
||||
wget -q http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz
|
||||
curl -fsSL http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz
|
||||
tar zxf freepbx-17.0-latest-EDGE.tgz
|
||||
cd /usr/local/src/freepbx/
|
||||
$STD ./start_asterisk start
|
||||
|
@ -15,16 +15,16 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y \
|
||||
curl sudo mc git gpg ca-certificates automake build-essential xz-utils libtool ccache pkg-config \
|
||||
libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev \
|
||||
libjpeg-dev libpng-dev libtiff-dev gfortran openexr libatlas-base-dev libssl-dev libtbb-dev \
|
||||
libopenexr-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev gcc gfortran \
|
||||
libopenblas-dev liblapack-dev libusb-1.0-0-dev jq moreutils tclsh libhdf5-dev libopenexr-dev
|
||||
curl sudo mc git gpg ca-certificates automake build-essential xz-utils libtool ccache pkg-config \
|
||||
libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev \
|
||||
libjpeg-dev libpng-dev libtiff-dev gfortran openexr libatlas-base-dev libssl-dev libtbb-dev \
|
||||
libopenexr-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev gcc gfortran \
|
||||
libopenblas-dev liblapack-dev libusb-1.0-0-dev jq moreutils tclsh libhdf5-dev libopenexr-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 python3-dev python3-setuptools python3-distutils python3-pip
|
||||
python3 python3-dev python3-setuptools python3-distutils python3-pip
|
||||
$STD pip install --upgrade pip
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
@ -39,7 +39,7 @@ msg_ok "Installed Node.js"
|
||||
msg_info "Installing go2rtc"
|
||||
mkdir -p /usr/local/go2rtc/bin
|
||||
cd /usr/local/go2rtc/bin
|
||||
wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64"
|
||||
curl -fsSL "https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64" -o go2rtc
|
||||
chmod +x go2rtc
|
||||
ln -sf /usr/local/go2rtc/bin/go2rtc /usr/local/bin/go2rtc
|
||||
msg_ok "Installed go2rtc"
|
||||
@ -47,16 +47,16 @@ msg_ok "Installed go2rtc"
|
||||
msg_info "Setting Up Hardware Acceleration"
|
||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
chgrp video /dev/dri
|
||||
chmod 755 /dev/dri
|
||||
chmod 660 /dev/dri/*
|
||||
chgrp video /dev/dri
|
||||
chmod 755 /dev/dri
|
||||
chmod 660 /dev/dri/*
|
||||
fi
|
||||
msg_ok "Set Up Hardware Acceleration"
|
||||
|
||||
msg_info "Setup Frigate"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name')
|
||||
mkdir -p /opt/frigate/models
|
||||
wget -q https://github.com/blakeblackshear/frigate/archive/refs/tags/${RELEASE}.tar.gz -O frigate.tar.gz
|
||||
curl -fsSL https://github.com/blakeblackshear/frigate/archive/refs/tags/${RELEASE}.tar.gz -O frigate.tar.gz
|
||||
tar -xzf frigate.tar.gz -C /opt/frigate --strip-components 1
|
||||
rm -rf frigate.tar.gz
|
||||
cd /opt/frigate
|
||||
@ -102,21 +102,21 @@ cameras:
|
||||
EOF
|
||||
ln -sf /config/config.yml /opt/frigate/config/config.yml
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group
|
||||
else
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:frigate/' -e 's/^render:x:105:$/kvm:x:105:/' /etc/group
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:frigate/' -e 's/^render:x:105:$/kvm:x:105:/' /etc/group
|
||||
fi
|
||||
echo "tmpfs /tmp/cache tmpfs defaults 0 0" >>/etc/fstab
|
||||
msg_ok "Installed Frigate $RELEASE"
|
||||
|
||||
read -p "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it? (y/n): " semantic_choice
|
||||
if [[ "$semantic_choice" == "y" ]]; then
|
||||
msg_info "Configuring Semantic Search & AI Models"
|
||||
mkdir -p /opt/frigate/models/semantic_search
|
||||
wget -qO /opt/frigate/models/semantic_search/clip_model.pt https://huggingface.co/openai/clip-vit-base-patch32/resolve/main/pytorch_model.bin
|
||||
msg_ok "Semantic Search Models Installed"
|
||||
msg_info "Configuring Semantic Search & AI Models"
|
||||
mkdir -p /opt/frigate/models/semantic_search
|
||||
curl -fsSL -o /opt/frigate/models/semantic_search/clip_model.pt https://huggingface.co/openai/clip-vit-base-patch32/resolve/main/pytorch_model.bin
|
||||
msg_ok "Semantic Search Models Installed"
|
||||
else
|
||||
msg_ok "Skipped Semantic Search Setup"
|
||||
msg_ok "Skipped Semantic Search Setup"
|
||||
fi
|
||||
msg_info "Building and Installing libUSB without udev"
|
||||
wget -qO /tmp/libusb.zip https://github.com/libusb/libusb/archive/v1.0.26.zip
|
||||
@ -134,7 +134,7 @@ msg_info "Installing Coral Object Detection Model (Patience)"
|
||||
cd /opt/frigate
|
||||
export CCACHE_DIR=/root/.ccache
|
||||
export CCACHE_MAXSIZE=2G
|
||||
wget -q https://github.com/libusb/libusb/archive/v1.0.26.zip
|
||||
curl -fsSL https://github.com/libusb/libusb/archive/v1.0.26.zip
|
||||
unzip -q v1.0.26.zip
|
||||
rm v1.0.26.zip
|
||||
cd libusb-1.0.26
|
||||
|
@ -60,7 +60,7 @@ msg_ok "Set up Database"
|
||||
msg_info "Setup healthchecks"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/healthchecks/healthchecks/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/healthchecks/healthchecks/archive/refs/tags/v${RELEASE}.zip"
|
||||
curl -fsSL "https://github.com/healthchecks/healthchecks/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv healthchecks-${RELEASE} /opt/healthchecks
|
||||
cd /opt/healthchecks
|
||||
|
@ -67,7 +67,7 @@ msg_ok "Added manyfold user"
|
||||
msg_info "Installing Manyfold"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
cd /opt
|
||||
wget -q "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip"
|
||||
curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q "v${RELEASE}.zip"
|
||||
mv /opt/manyfold-${RELEASE}/ /opt/manyfold
|
||||
cd /opt/manyfold
|
||||
|
@ -24,9 +24,9 @@ msg_ok "Installed Dependencies"
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
tmp_file=$(mktemp)
|
||||
RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -O $tmp_file
|
||||
curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -O $tmp_file
|
||||
$STD dpkg -i $tmp_file
|
||||
wget -q https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -O /etc/meilisearch.toml
|
||||
curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -O /etc/meilisearch.toml
|
||||
MASTER_KEY=$(openssl rand -base64 12)
|
||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
||||
sed -i \
|
||||
@ -60,7 +60,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
tmp_dir=$(mktemp -d)
|
||||
mkdir -p /opt/meilisearch-ui
|
||||
RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -O $tmp_file
|
||||
curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -O $tmp_file
|
||||
unzip -q "$tmp_file" -d "$tmp_dir"
|
||||
mv "$tmp_dir"/*/* /opt/meilisearch-ui/
|
||||
cd /opt/meilisearch-ui
|
||||
|
@ -24,7 +24,7 @@ msg_info "Setup qBittorrent-nox"
|
||||
FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
RELEASE=$(echo $RELEASE | cut -c 9-13)
|
||||
mkdir -p /opt/qbittorrent
|
||||
wget -q "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox -O /opt/qbittorrent/qbittorrent-nox"
|
||||
curl -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox -O /opt/qbittorrent/qbittorrent-nox"
|
||||
chmod +x /opt/qbittorrent/qbittorrent-nox
|
||||
mkdir -p $HOME/.config/qBittorrent/
|
||||
cat <<EOF >$HOME/.config/qBittorrent/qBittorrent.conf
|
||||
|
@ -25,7 +25,7 @@ msg_ok "Installed Dependencies"
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
tmp_file=$(mktemp)
|
||||
RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -O $tmp_file
|
||||
curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -O $tmp_file
|
||||
unzip -q $tmp_file -d /opt/${APPLICATION}
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
JWT_KEY=$(openssl rand -base64 44)
|
||||
@ -45,7 +45,7 @@ msg_ok "Setup ${APPLICATION}"
|
||||
msg_info "Installing Soularr"
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
cd /tmp
|
||||
wget -q https://github.com/mrusse/soularr/archive/refs/heads/main.zip
|
||||
curl -fsSL https://github.com/mrusse/soularr/archive/refs/heads/main.zip
|
||||
unzip -q main.zip
|
||||
mv soularr-main /opt/soularr
|
||||
cd /opt/soularr
|
||||
|
@ -15,9 +15,9 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
sudo \
|
||||
mc \
|
||||
curl
|
||||
sudo \
|
||||
mc \
|
||||
curl
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
# Fetching the latest Wazuh version
|
||||
@ -26,15 +26,15 @@ RELEASE=$(curl -s https://api.github.com/repos/wazuh/wazuh/releases/latest | gre
|
||||
msg_ok "Latest Wazuh Version: $RELEASE"
|
||||
|
||||
msg_info "Setup Wazuh"
|
||||
wget -q https://packages.wazuh.com/$RELEASE/wazuh-install.sh
|
||||
curl -fsSL https://packages.wazuh.com/$RELEASE/wazuh-install.sh
|
||||
chmod +x wazuh-install.sh
|
||||
|
||||
if [ "$STD" = "silent" ]; then
|
||||
bash wazuh-install.sh -a >> ~/wazuh-install.output
|
||||
bash wazuh-install.sh -a >>~/wazuh-install.output
|
||||
else
|
||||
bash wazuh-install.sh -a | tee -a ~/wazuh-install.output
|
||||
bash wazuh-install.sh -a | tee -a ~/wazuh-install.output
|
||||
fi
|
||||
cat ~/wazuh-install.output | grep -E "User|Password" | awk '{$1=$1};1' | sed '1i wazuh-credentials' > ~/wazuh.creds
|
||||
cat ~/wazuh-install.output | grep -E "User|Password" | awk '{$1=$1};1' | sed '1i wazuh-credentials' >~/wazuh.creds
|
||||
msg_ok "Setup Wazuh"
|
||||
|
||||
motd_ssh
|
||||
|
2400
misc/build.func
2400
misc/build.func
File diff suppressed because it is too large
Load Diff
@ -6,198 +6,198 @@
|
||||
|
||||
# This function sets color variables for formatting output in the terminal
|
||||
color() {
|
||||
# Colors
|
||||
YW=$(echo "\033[33m")
|
||||
YWB=$(echo "\033[93m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
# Colors
|
||||
YW=$(echo "\033[33m")
|
||||
YWB=$(echo "\033[93m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
|
||||
# Formatting
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
BOLD=$(echo "\033[1m")
|
||||
HOLD=" "
|
||||
TAB=" "
|
||||
# Formatting
|
||||
CL=$(echo "\033[m")
|
||||
BFR="\\r\\033[K"
|
||||
BOLD=$(echo "\033[1m")
|
||||
HOLD=" "
|
||||
TAB=" "
|
||||
|
||||
# System
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
# System
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
|
||||
# Icons
|
||||
CM="${TAB}✔️${TAB}${CL}"
|
||||
CROSS="${TAB}✖️${TAB}${CL}"
|
||||
INFO="${TAB}💡${TAB}${CL}"
|
||||
NETWORK="${TAB}📡${TAB}${CL}"
|
||||
OS="${TAB}🖥️${TAB}${CL}"
|
||||
OSVERSION="${TAB}🌟${TAB}${CL}"
|
||||
HOSTNAME="${TAB}🏠${TAB}${CL}"
|
||||
GATEWAY="${TAB}🌐${TAB}${CL}"
|
||||
DEFAULT="${TAB}⚙️${TAB}${CL}"
|
||||
# Icons
|
||||
CM="${TAB}✔️${TAB}${CL}"
|
||||
CROSS="${TAB}✖️${TAB}${CL}"
|
||||
INFO="${TAB}💡${TAB}${CL}"
|
||||
NETWORK="${TAB}📡${TAB}${CL}"
|
||||
OS="${TAB}🖥️${TAB}${CL}"
|
||||
OSVERSION="${TAB}🌟${TAB}${CL}"
|
||||
HOSTNAME="${TAB}🏠${TAB}${CL}"
|
||||
GATEWAY="${TAB}🌐${TAB}${CL}"
|
||||
DEFAULT="${TAB}⚙️${TAB}${CL}"
|
||||
}
|
||||
|
||||
# Function to set STD mode based on verbosity
|
||||
set_std_mode() {
|
||||
if [ "$VERBOSE" = "yes" ]; then
|
||||
STD=""
|
||||
else
|
||||
STD="silent"
|
||||
fi
|
||||
if [ "$VERBOSE" = "yes" ]; then
|
||||
STD=""
|
||||
else
|
||||
STD="silent"
|
||||
fi
|
||||
}
|
||||
|
||||
# Silent execution function
|
||||
silent() {
|
||||
"$@" >/dev/null 2>&1
|
||||
"$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# This function enables IPv6 if it's not disabled and sets verbose mode
|
||||
verb_ip6() {
|
||||
set_std_mode # Set STD mode based on VERBOSE
|
||||
set_std_mode # Set STD mode based on VERBOSE
|
||||
|
||||
if [ "$DISABLEIPV6" == "yes" ]; then
|
||||
echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf
|
||||
$STD sysctl -p
|
||||
fi
|
||||
if [ "$DISABLEIPV6" == "yes" ]; then
|
||||
echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf
|
||||
$STD sysctl -p
|
||||
fi
|
||||
}
|
||||
|
||||
# This function sets error handling options and defines the error_handler function to handle errors
|
||||
catch_errors() {
|
||||
set -Eeuo pipefail
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
set -Eeuo pipefail
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
}
|
||||
|
||||
# This function handles errors
|
||||
error_handler() {
|
||||
source <(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
|
||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||
printf "\e[?25h"
|
||||
local exit_code="$?"
|
||||
local line_number="$1"
|
||||
local command="$2"
|
||||
local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
|
||||
echo -e "\n$error_message"
|
||||
if [[ "$line_number" -eq 50 ]]; then
|
||||
echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n"
|
||||
post_update_to_api "failed" "No error message, script ran in silent mode"
|
||||
else
|
||||
post_update_to_api "failed" "${command}"
|
||||
fi
|
||||
source <(curl -fsSL - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
|
||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||
printf "\e[?25h"
|
||||
local exit_code="$?"
|
||||
local line_number="$1"
|
||||
local command="$2"
|
||||
local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
|
||||
echo -e "\n$error_message"
|
||||
if [[ "$line_number" -eq 50 ]]; then
|
||||
echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n"
|
||||
post_update_to_api "failed" "No error message, script ran in silent mode"
|
||||
else
|
||||
post_update_to_api "failed" "${command}"
|
||||
fi
|
||||
}
|
||||
|
||||
# This function displays a spinner.
|
||||
spinner() {
|
||||
local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
|
||||
local spin_i=0
|
||||
local interval=0.1
|
||||
printf "\e[?25l"
|
||||
local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
|
||||
local spin_i=0
|
||||
local interval=0.1
|
||||
printf "\e[?25l"
|
||||
|
||||
local color="${YWB}"
|
||||
local color="${YWB}"
|
||||
|
||||
while true; do
|
||||
printf "\r ${color}%s${CL}" "${frames[spin_i]}"
|
||||
spin_i=$(((spin_i + 1) % ${#frames[@]}))
|
||||
sleep "$interval"
|
||||
done
|
||||
while true; do
|
||||
printf "\r ${color}%s${CL}" "${frames[spin_i]}"
|
||||
spin_i=$(((spin_i + 1) % ${#frames[@]}))
|
||||
sleep "$interval"
|
||||
done
|
||||
}
|
||||
|
||||
# This function displays an informational message with a yellow color.
|
||||
msg_info() {
|
||||
local msg="$1"
|
||||
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||
spinner &
|
||||
SPINNER_PID=$!
|
||||
local msg="$1"
|
||||
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||
spinner &
|
||||
SPINNER_PID=$!
|
||||
}
|
||||
|
||||
# This function displays a success message with a green color.
|
||||
msg_ok() {
|
||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||
printf "\e[?25h"
|
||||
local msg="$1"
|
||||
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||
printf "\e[?25h"
|
||||
local msg="$1"
|
||||
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||
}
|
||||
|
||||
# This function displays a error message with a red color.
|
||||
msg_error() {
|
||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||
printf "\e[?25h"
|
||||
local msg="$1"
|
||||
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||
printf "\e[?25h"
|
||||
local msg="$1"
|
||||
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||
}
|
||||
|
||||
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
||||
setting_up_container() {
|
||||
msg_info "Setting up Container OS"
|
||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1)
|
||||
echo "LANG=${locale_line}" >/etc/default/locale
|
||||
locale-gen >/dev/null
|
||||
export LANG=${locale_line}
|
||||
echo $tz >/etc/timezone
|
||||
ln -sf /usr/share/zoneinfo/$tz /etc/localtime
|
||||
for ((i = RETRY_NUM; i > 0; i--)); do
|
||||
if [ "$(hostname -I)" != "" ]; then
|
||||
break
|
||||
fi
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
done
|
||||
if [ "$(hostname -I)" = "" ]; then
|
||||
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
echo -e "${NETWORK}Check Network Settings"
|
||||
exit 1
|
||||
msg_info "Setting up Container OS"
|
||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1)
|
||||
echo "LANG=${locale_line}" >/etc/default/locale
|
||||
locale-gen >/dev/null
|
||||
export LANG=${locale_line}
|
||||
echo $tz >/etc/timezone
|
||||
ln -sf /usr/share/zoneinfo/$tz /etc/localtime
|
||||
for ((i = RETRY_NUM; i > 0; i--)); do
|
||||
if [ "$(hostname -I)" != "" ]; then
|
||||
break
|
||||
fi
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
systemctl disable -q --now systemd-networkd-wait-online.service
|
||||
msg_ok "Set up Container OS"
|
||||
msg_ok "Network Connected: ${BL}$(hostname -I)"
|
||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
done
|
||||
if [ "$(hostname -I)" = "" ]; then
|
||||
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||
echo -e "${NETWORK}Check Network Settings"
|
||||
exit 1
|
||||
fi
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
systemctl disable -q --now systemd-networkd-wait-online.service
|
||||
msg_ok "Set up Container OS"
|
||||
msg_ok "Network Connected: ${BL}$(hostname -I)"
|
||||
}
|
||||
|
||||
# This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected
|
||||
network_check() {
|
||||
set +e
|
||||
trap - ERR
|
||||
ipv4_connected=false
|
||||
ipv6_connected=false
|
||||
sleep 1
|
||||
# Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers.
|
||||
if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then
|
||||
msg_ok "IPv4 Internet Connected"
|
||||
ipv4_connected=true
|
||||
set +e
|
||||
trap - ERR
|
||||
ipv4_connected=false
|
||||
ipv6_connected=false
|
||||
sleep 1
|
||||
# Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers.
|
||||
if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then
|
||||
msg_ok "IPv4 Internet Connected"
|
||||
ipv4_connected=true
|
||||
else
|
||||
msg_error "IPv4 Internet Not Connected"
|
||||
fi
|
||||
|
||||
# Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers.
|
||||
if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then
|
||||
msg_ok "IPv6 Internet Connected"
|
||||
ipv6_connected=true
|
||||
else
|
||||
msg_error "IPv6 Internet Not Connected"
|
||||
fi
|
||||
|
||||
# If both IPv4 and IPv6 checks fail, prompt the user
|
||||
if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then
|
||||
read -r -p "No Internet detected,would you like to continue anyway? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
echo -e "${INFO}${RD}Expect Issues Without Internet${CL}"
|
||||
else
|
||||
msg_error "IPv4 Internet Not Connected"
|
||||
echo -e "${NETWORK}Check Network Settings"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers.
|
||||
if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then
|
||||
msg_ok "IPv6 Internet Connected"
|
||||
ipv6_connected=true
|
||||
else
|
||||
msg_error "IPv6 Internet Not Connected"
|
||||
fi
|
||||
|
||||
# If both IPv4 and IPv6 checks fail, prompt the user
|
||||
if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then
|
||||
read -r -p "No Internet detected,would you like to continue anyway? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
echo -e "${INFO}${RD}Expect Issues Without Internet${CL}"
|
||||
else
|
||||
echo -e "${NETWORK}Check Network Settings"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }')
|
||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi
|
||||
set -e
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }')
|
||||
if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to ${BL}$RESOLVEDIP${CL}"; fi
|
||||
set -e
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
}
|
||||
|
||||
# This function updates the Container OS by running apt-get update and upgrade
|
||||
update_os() {
|
||||
msg_info "Updating Container OS"
|
||||
if [[ "$CACHER" == "yes" ]]; then
|
||||
echo "Acquire::http::Proxy-Auto-Detect \"/usr/local/bin/apt-proxy-detect.sh\";" >/etc/apt/apt.conf.d/00aptproxy
|
||||
cat <<EOF >/usr/local/bin/apt-proxy-detect.sh
|
||||
msg_info "Updating Container OS"
|
||||
if [[ "$CACHER" == "yes" ]]; then
|
||||
echo "Acquire::http::Proxy-Auto-Detect \"/usr/local/bin/apt-proxy-detect.sh\";" >/etc/apt/apt.conf.d/00aptproxy
|
||||
cat <<EOF >/usr/local/bin/apt-proxy-detect.sh
|
||||
#!/bin/bash
|
||||
if nc -w1 -z "${CACHER_IP}" 3142; then
|
||||
echo -n "http://${CACHER_IP}:3142"
|
||||
@ -205,71 +205,71 @@ else
|
||||
echo -n "DIRECT"
|
||||
fi
|
||||
EOF
|
||||
chmod +x /usr/local/bin/apt-proxy-detect.sh
|
||||
fi
|
||||
$STD apt-get update
|
||||
$STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Container OS"
|
||||
chmod +x /usr/local/bin/apt-proxy-detect.sh
|
||||
fi
|
||||
$STD apt-get update
|
||||
$STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Container OS"
|
||||
|
||||
msg_info "Installing core dependencies"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y sudo curl mc
|
||||
msg_ok "Core dependencies installed"
|
||||
msg_info "Installing core dependencies"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y sudo curl mc
|
||||
msg_ok "Core dependencies installed"
|
||||
}
|
||||
|
||||
# This function modifies the message of the day (motd) and SSH settings
|
||||
motd_ssh() {
|
||||
grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||
grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||
|
||||
if [ -f "/etc/os-release" ]; then
|
||||
OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||
OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||
elif [ -f "/etc/debian_version" ]; then
|
||||
OS_NAME="Debian"
|
||||
OS_VERSION=$(cat /etc/debian_version)
|
||||
fi
|
||||
if [ -f "/etc/os-release" ]; then
|
||||
OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||
OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||
elif [ -f "/etc/debian_version" ]; then
|
||||
OS_NAME="Debian"
|
||||
OS_VERSION=$(cat /etc/debian_version)
|
||||
fi
|
||||
|
||||
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
||||
echo "echo -e \"\"" >"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${BOLD}${YW}${APPLICATION} LXC Container - DEV Repository${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${RD}WARNING: This is a DEVELOPMENT version (ProxmoxVED). Do NOT use in production!${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} Repository: ${GN}https://github.com/community-scripts/ProxmoxVED${CL}\"" >>"$PROFILE_FILE"
|
||||
echo "echo \"\"" >>"$PROFILE_FILE"
|
||||
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
||||
echo "echo -e \"\"" >"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${BOLD}${YW}${APPLICATION} LXC Container - DEV Repository${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${RD}WARNING: This is a DEVELOPMENT version (ProxmoxVED). Do NOT use in production!${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >>"$PROFILE_FILE"
|
||||
echo -e "echo -e \"${YW} Repository: ${GN}https://github.com/community-scripts/ProxmoxVED${CL}\"" >>"$PROFILE_FILE"
|
||||
echo "echo \"\"" >>"$PROFILE_FILE"
|
||||
|
||||
chmod -x /etc/update-motd.d/*
|
||||
chmod -x /etc/update-motd.d/*
|
||||
|
||||
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
||||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
||||
systemctl restart sshd
|
||||
fi
|
||||
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
||||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
||||
systemctl restart sshd
|
||||
fi
|
||||
}
|
||||
|
||||
# This function customizes the container by modifying the getty service and enabling auto-login for the root user
|
||||
customize() {
|
||||
if [[ "$PASSWORD" == "" ]]; then
|
||||
msg_info "Customizing Container"
|
||||
GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
|
||||
mkdir -p $(dirname $GETTY_OVERRIDE)
|
||||
cat <<EOF >$GETTY_OVERRIDE
|
||||
if [[ "$PASSWORD" == "" ]]; then
|
||||
msg_info "Customizing Container"
|
||||
GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
|
||||
mkdir -p $(dirname $GETTY_OVERRIDE)
|
||||
cat <<EOF >$GETTY_OVERRIDE
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||
msg_ok "Customized Container"
|
||||
fi
|
||||
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||
chmod +x /usr/bin/update
|
||||
|
||||
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||
mkdir -p /root/.ssh
|
||||
echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys
|
||||
chmod 700 /root/.ssh
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
systemctl daemon-reload
|
||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||
msg_ok "Customized Container"
|
||||
fi
|
||||
echo "bash -c \"\$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||
chmod +x /usr/bin/update
|
||||
curl -fsSL
|
||||
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||
mkdir -p /root/.ssh
|
||||
echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys
|
||||
chmod 700 /root/.ssh
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
clear
|
||||
cat <<"EOF"
|
||||
_______ __ ____
|
||||
/ ____(_) /__ / __ )_________ _ __________ _____
|
||||
/ /_ / / / _ \/ __ / ___/ __ \ | /| / / ___/ _ \/ ___/
|
||||
@ -36,67 +36,66 @@ IP=$(ip -4 addr show "$IFACE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n
|
||||
[[ -z "$IP" ]] && IP=$(hostname -I | awk '{print $1}')
|
||||
[[ -z "$IP" ]] && IP="127.0.0.1"
|
||||
|
||||
|
||||
# Detect OS
|
||||
if [[ -f "/etc/alpine-release" ]]; then
|
||||
OS="Alpine"
|
||||
SERVICE_PATH="/etc/init.d/filebrowser"
|
||||
PKG_MANAGER="apk add --no-cache"
|
||||
OS="Alpine"
|
||||
SERVICE_PATH="/etc/init.d/filebrowser"
|
||||
PKG_MANAGER="apk add --no-cache"
|
||||
elif [[ -f "/etc/debian_version" ]]; then
|
||||
OS="Debian"
|
||||
SERVICE_PATH="/etc/systemd/system/filebrowser.service"
|
||||
PKG_MANAGER="apt-get install -y"
|
||||
OS="Debian"
|
||||
SERVICE_PATH="/etc/systemd/system/filebrowser.service"
|
||||
PKG_MANAGER="apt-get install -y"
|
||||
else
|
||||
echo -e "${CROSS} Unsupported OS detected. Exiting."
|
||||
exit 1
|
||||
echo -e "${CROSS} Unsupported OS detected. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
header_info
|
||||
|
||||
function msg_info() {
|
||||
local msg="$1"
|
||||
echo -e "${INFO} ${YW}${msg}...${CL}"
|
||||
local msg="$1"
|
||||
echo -e "${INFO} ${YW}${msg}...${CL}"
|
||||
}
|
||||
|
||||
function msg_ok() {
|
||||
local msg="$1"
|
||||
echo -e "${CM} ${GN}${msg}${CL}"
|
||||
local msg="$1"
|
||||
echo -e "${CM} ${GN}${msg}${CL}"
|
||||
}
|
||||
|
||||
function msg_error() {
|
||||
local msg="$1"
|
||||
echo -e "${CROSS} ${RD}${msg}${CL}"
|
||||
local msg="$1"
|
||||
echo -e "${CROSS} ${RD}${msg}${CL}"
|
||||
}
|
||||
|
||||
if [ -f "$INSTALL_PATH" ]; then
|
||||
echo -e "${YW}⚠️ ${APP} is already installed.${CL}"
|
||||
read -r -p "Would you like to uninstall ${APP}? (y/N): " uninstall_prompt
|
||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Uninstalling ${APP}"
|
||||
if [[ "$OS" == "Debian" ]]; then
|
||||
systemctl disable --now filebrowser.service &>/dev/null
|
||||
rm -f "$SERVICE_PATH"
|
||||
else
|
||||
rc-service filebrowser stop &>/dev/null
|
||||
rc-update del filebrowser &>/dev/null
|
||||
rm -f "$SERVICE_PATH"
|
||||
fi
|
||||
rm -f "$INSTALL_PATH" "$DB_PATH"
|
||||
msg_ok "${APP} has been uninstalled."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -r -p "Would you like to update ${APP}? (y/N): " update_prompt
|
||||
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Updating ${APP}"
|
||||
wget -qO- https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null
|
||||
chmod +x "$INSTALL_PATH"
|
||||
msg_ok "Updated ${APP}"
|
||||
exit 0
|
||||
echo -e "${YW}⚠️ ${APP} is already installed.${CL}"
|
||||
read -r -p "Would you like to uninstall ${APP}? (y/N): " uninstall_prompt
|
||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Uninstalling ${APP}"
|
||||
if [[ "$OS" == "Debian" ]]; then
|
||||
systemctl disable --now filebrowser.service &>/dev/null
|
||||
rm -f "$SERVICE_PATH"
|
||||
else
|
||||
echo -e "${YW}⚠️ Update skipped. Exiting.${CL}"
|
||||
exit 0
|
||||
rc-service filebrowser stop &>/dev/null
|
||||
rc-update del filebrowser &>/dev/null
|
||||
rm -f "$SERVICE_PATH"
|
||||
fi
|
||||
rm -f "$INSTALL_PATH" "$DB_PATH"
|
||||
msg_ok "${APP} has been uninstalled."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -r -p "Would you like to update ${APP}? (y/N): " update_prompt
|
||||
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Updating ${APP}"
|
||||
curl -fsSL https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null
|
||||
chmod +x "$INSTALL_PATH"
|
||||
msg_ok "Updated ${APP}"
|
||||
exit 0
|
||||
else
|
||||
echo -e "${YW}⚠️ Update skipped. Exiting.${CL}"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${YW}⚠️ ${APP} is not installed.${CL}"
|
||||
@ -105,43 +104,43 @@ PORT=${PORT:-$DEFAULT_PORT}
|
||||
|
||||
read -r -p "Would you like to install ${APP}? (y/n): " install_prompt
|
||||
if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Installing ${APP} on ${OS}"
|
||||
$PKG_MANAGER wget tar curl &>/dev/null
|
||||
wget -qO- https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null
|
||||
chmod +x "$INSTALL_PATH"
|
||||
msg_ok "Installed ${APP}"
|
||||
msg_info "Installing ${APP} on ${OS}"
|
||||
$PKG_MANAGER wget tar curl &>/dev/null
|
||||
curl -fsSL https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null
|
||||
chmod +x "$INSTALL_PATH"
|
||||
msg_ok "Installed ${APP}"
|
||||
|
||||
msg_info "Creating FileBrowser directory"
|
||||
mkdir -p /usr/local/community-scripts
|
||||
chown root:root /usr/local/community-scripts
|
||||
chmod 755 /usr/local/community-scripts
|
||||
touch "$DB_PATH"
|
||||
chown root:root "$DB_PATH"
|
||||
chmod 644 "$DB_PATH"
|
||||
msg_ok "Directory created successfully"
|
||||
msg_info "Creating FileBrowser directory"
|
||||
mkdir -p /usr/local/community-scripts
|
||||
chown root:root /usr/local/community-scripts
|
||||
chmod 755 /usr/local/community-scripts
|
||||
touch "$DB_PATH"
|
||||
chown root:root "$DB_PATH"
|
||||
chmod 644 "$DB_PATH"
|
||||
msg_ok "Directory created successfully"
|
||||
|
||||
read -r -p "Would you like to use No Authentication? (y/N): " auth_prompt
|
||||
if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Configuring No Authentication"
|
||||
cd /usr/local/community-scripts
|
||||
filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config init --auth.method=noauth &>/dev/null
|
||||
filebrowser config set --auth.method=noauth &>/dev/null
|
||||
filebrowser users add ID 1 --perm.admin &>/dev/null
|
||||
msg_ok "No Authentication configured"
|
||||
else
|
||||
msg_info "Setting up default authentication"
|
||||
cd /usr/local/community-scripts
|
||||
filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser users add admin helper-scripts.com --perm.admin --database "$DB_PATH" &>/dev/null
|
||||
msg_ok "Default authentication configured (admin:helper-scripts.com)"
|
||||
fi
|
||||
read -r -p "Would you like to use No Authentication? (y/N): " auth_prompt
|
||||
if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Configuring No Authentication"
|
||||
cd /usr/local/community-scripts
|
||||
filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config init --auth.method=noauth &>/dev/null
|
||||
filebrowser config set --auth.method=noauth &>/dev/null
|
||||
filebrowser users add ID 1 --perm.admin &>/dev/null
|
||||
msg_ok "No Authentication configured"
|
||||
else
|
||||
msg_info "Setting up default authentication"
|
||||
cd /usr/local/community-scripts
|
||||
filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser users add admin helper-scripts.com --perm.admin --database "$DB_PATH" &>/dev/null
|
||||
msg_ok "Default authentication configured (admin:helper-scripts.com)"
|
||||
fi
|
||||
|
||||
msg_info "Creating service"
|
||||
if [[ "$OS" == "Debian" ]]; then
|
||||
cat <<EOF > "$SERVICE_PATH"
|
||||
msg_info "Creating service"
|
||||
if [[ "$OS" == "Debian" ]]; then
|
||||
cat <<EOF >"$SERVICE_PATH"
|
||||
[Unit]
|
||||
Description=Filebrowser
|
||||
After=network-online.target
|
||||
@ -157,9 +156,9 @@ Restart=always
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now filebrowser
|
||||
else
|
||||
cat <<EOF > "$SERVICE_PATH"
|
||||
systemctl enable -q --now filebrowser
|
||||
else
|
||||
cat <<EOF >"$SERVICE_PATH"
|
||||
#!/sbin/openrc-run
|
||||
|
||||
command="/usr/local/bin/filebrowser"
|
||||
@ -172,14 +171,14 @@ depend() {
|
||||
need net
|
||||
}
|
||||
EOF
|
||||
chmod +x "$SERVICE_PATH"
|
||||
rc-update add filebrowser default &>/dev/null
|
||||
rc-service filebrowser start &>/dev/null
|
||||
fi
|
||||
msg_ok "Service created successfully"
|
||||
chmod +x "$SERVICE_PATH"
|
||||
rc-update add filebrowser default &>/dev/null
|
||||
rc-service filebrowser start &>/dev/null
|
||||
fi
|
||||
msg_ok "Service created successfully"
|
||||
|
||||
echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://$IP:$PORT${CL}"
|
||||
echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://$IP:$PORT${CL}"
|
||||
else
|
||||
echo -e "${YW}⚠️ Installation skipped. Exiting.${CL}"
|
||||
exit 0
|
||||
echo -e "${YW}⚠️ Installation skipped. Exiting.${CL}"
|
||||
exit 0
|
||||
fi
|
||||
|
@ -6,8 +6,8 @@
|
||||
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ _ __ ____ __
|
||||
/ __/___(_)__ ____ _/ /____ / __/_ _____ ___ ___ ____/ /_
|
||||
/ _// __/ / _ `/ _ `/ __/ -_) _\ \/ // / _ \/ _ \/ _ \/ __/ __/
|
||||
@ -28,11 +28,11 @@ header_info
|
||||
|
||||
# The array of device types
|
||||
# CHAR_DEVS+=(major:minor)
|
||||
CHAR_DEVS+=("1:1") # mem
|
||||
CHAR_DEVS+=("29:0") # fb0
|
||||
CHAR_DEVS+=("188:.*") # ttyUSB*
|
||||
CHAR_DEVS+=("189:.*") # bus/usb/*
|
||||
CHAR_DEVS+=("226:0") # card0
|
||||
CHAR_DEVS+=("1:1") # mem
|
||||
CHAR_DEVS+=("29:0") # fb0
|
||||
CHAR_DEVS+=("188:.*") # ttyUSB*
|
||||
CHAR_DEVS+=("189:.*") # bus/usb/*
|
||||
CHAR_DEVS+=("226:0") # card0
|
||||
CHAR_DEVS+=("226:128") # renderD128
|
||||
|
||||
# Proccess char device string
|
||||
@ -89,5 +89,5 @@ EOF
|
||||
echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m"
|
||||
|
||||
# In the Proxmox web shell run
|
||||
# bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/misc/frigate-support.sh)"
|
||||
# bash -c "$(curl -fsSL - https://github.com/community-scripts/ProxmoxVED/raw/main/misc/frigate-support.sh)"
|
||||
# Reboot the LXC to apply the changes
|
@ -5,7 +5,7 @@
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Execute within the Proxmox shell
|
||||
# bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVED/raw/main/misc/hw-acceleration.sh)"
|
||||
# bash -c "$(curl -fsSL - https://github.com/community-scripts/ProxmoxVED/raw/main/misc/hw-acceleration.sh)"
|
||||
|
||||
set -e
|
||||
function header_info {
|
||||
@ -56,8 +56,8 @@ MSG_MAX_LENGTH=0
|
||||
privileged_containers=$(pct list | awk 'NR>1 && system("grep -q \047unprivileged: 1\047 /etc/pve/lxc/" $1 ".conf")')
|
||||
|
||||
if [ -z "$privileged_containers" ]; then
|
||||
whiptail --msgbox "No Privileged Containers Found." 10 58
|
||||
exit
|
||||
whiptail --msgbox "No Privileged Containers Found." 10 58
|
||||
exit
|
||||
fi
|
||||
|
||||
while read -r TAG ITEM; do
|
||||
@ -69,11 +69,11 @@ done < <(echo "$privileged_containers")
|
||||
privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add Intel HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
||||
header_info
|
||||
read -r -p "Verbose mode? <y/N> " prompt
|
||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
STD=""
|
||||
else
|
||||
else
|
||||
STD="silent"
|
||||
fi
|
||||
fi
|
||||
header_info
|
||||
|
||||
cat <<EOF >>/etc/pve/lxc/${privileged_container}.conf
|
||||
|
@ -4,8 +4,8 @@
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
|
||||
source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func)
|
||||
source /dev/stdin <<< $(curl -fsSL - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
|
||||
source /dev/stdin <<< $(curl -fsSL - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/helpers.func)
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
@ -323,7 +323,7 @@ msg_info "Retrieving the URL for the Debian 12 Qcow2 Disk Image"
|
||||
URL=https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-nocloud-amd64.qcow2
|
||||
sleep 2
|
||||
msg_ok "${CL}${BL}${URL}${CL}"
|
||||
wget -q --show-progress $URL
|
||||
curl -fL --progress-bar "$URL" -O
|
||||
echo -en "\e[1A\e[0K"
|
||||
FILE=$(basename $URL)
|
||||
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
|
||||
source /dev/stdin <<<$(curl -fsSL - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
@ -93,7 +93,7 @@ pushd $TEMP_DIR >/dev/null
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then
|
||||
:
|
||||
else
|
||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||
fi
|
||||
|
||||
function msg_info() {
|
||||
@ -122,7 +122,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
@ -425,7 +425,7 @@ msg_info "Retrieving the URL for the Debian 12 Qcow2 Disk Image"
|
||||
URL=https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-nocloud-amd64.qcow2
|
||||
sleep 2
|
||||
msg_ok "${CL}${BL}${URL}${CL}"
|
||||
wget -q --show-progress $URL
|
||||
curl -fL --progress-bar "$URL" -O
|
||||
echo -en "\e[1A\e[0K"
|
||||
FILE=$(basename $URL)
|
||||
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
|
||||
@ -494,11 +494,11 @@ EOF
|
||||
)
|
||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||
if [ -n "$DISK_SIZE" ]; then
|
||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||
else
|
||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||
fi
|
||||
|
||||
msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})"
|
||||
|
Loading…
x
Reference in New Issue
Block a user