Merge branch 'community-scripts:main' into alpine-ntfy
This commit is contained in:
commit
440f1a28b5
106
.github/workflows/revision-bump.yml
vendored
Normal file
106
.github/workflows/revision-bump.yml
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
name: Bump build.func Revision
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "misc/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
bump-revision:
|
||||
if: github.repository == 'community-scripts/ProxmoxVED'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Generate token for PR
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ vars.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Generate token for auto-merge
|
||||
id: generate-token-merge
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID_APPROVE_AND_MERGE }}
|
||||
private-key: ${{ secrets.APP_KEY_APPROVE_AND_MERGE }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Get changed files
|
||||
id: changes
|
||||
run: |
|
||||
git diff --name-only HEAD^ HEAD > changed_files.txt
|
||||
echo "Changed files:"
|
||||
cat changed_files.txt
|
||||
|
||||
- name: Skip if only build.func changed
|
||||
id: skipcheck
|
||||
run: |
|
||||
if grep -q "^misc/build.func$" changed_files.txt && [ $(wc -l < changed_files.txt) -eq 1 ]; then
|
||||
echo "skip=true" >> $GITHUB_ENV
|
||||
else
|
||||
echo "skip=false" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Disable file mode changes
|
||||
run: git config core.fileMode false
|
||||
|
||||
- name: Bump build.func revision
|
||||
if: env.skip == 'false'
|
||||
run: |
|
||||
REV_FILE=".build-revision"
|
||||
if [ ! -f "$REV_FILE" ]; then echo 0 > "$REV_FILE"; fi
|
||||
REV_NUM=$(($(cat $REV_FILE) + 1))
|
||||
echo $REV_NUM > $REV_FILE
|
||||
SHORT_SHA=$(git rev-parse --short HEAD)
|
||||
REV_STR="Revision: r${REV_NUM} (git-${SHORT_SHA})"
|
||||
|
||||
echo "Updating build.func with $REV_STR"
|
||||
sed -i "s/^# Revision:.*/# $REV_STR/" misc/build.func
|
||||
echo "REV_STR=$REV_STR" >> $GITHUB_ENV
|
||||
|
||||
git config --global user.name "GitHub Actions"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add misc/build.func .build-revision
|
||||
git commit -m "chore: bump build.func to $REV_STR"
|
||||
|
||||
- name: Create PR
|
||||
if: env.skip == 'false'
|
||||
run: |
|
||||
BRANCH_NAME="pr-build-revision-$(date +'%Y%m%d%H%M%S')"
|
||||
git checkout -b $BRANCH_NAME
|
||||
git push origin $BRANCH_NAME
|
||||
|
||||
gh pr create --title "[core] bump build.func to $REV_STR" \
|
||||
--body "This PR bumps build.func revision because files in misc/ changed." \
|
||||
--head $BRANCH_NAME \
|
||||
--base main \
|
||||
--label "automated pr"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
- name: Approve PR and merge
|
||||
if: env.skip == 'false'
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
fi
|
||||
|
||||
- name: Skip log
|
||||
if: env.skip == 'true'
|
||||
run: echo "Only build.func changed – nothing to do."
|
@ -17,24 +17,24 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /etc/caddy ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apk -U upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /etc/caddy ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apk -U upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
|
||||
msg_info "Restarting Caddy"
|
||||
rc-service caddy restart
|
||||
msg_ok "Restarted Caddy"
|
||||
exit
|
||||
msg_info "Restarting Caddy"
|
||||
rc-service caddy restart
|
||||
msg_ok "Restarted Caddy"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -19,7 +19,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -18,7 +18,7 @@ header_info "$APP"
|
||||
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="1"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -19,7 +19,7 @@ var_tun="${var_tun:-yes}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="1"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -26,7 +26,7 @@ var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function default_settings() {
|
||||
CT_TYPE="1"
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -16,7 +16,7 @@ var_version="${var_version:-12}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -16,7 +16,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-0}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
# this only updates garmin-grafana, not influxdb or grafana, which are upgraded with apt
|
||||
function update_script() {
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -16,21 +16,21 @@ var_version="${var_version:-13}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /usr/sbin/globaleaks ]]; then
|
||||
msg_error "No ${APP} installation found!"
|
||||
exit
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /usr/sbin/globaleaks ]]; then
|
||||
msg_error "No ${APP} installation found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
6
ct/headers/alpine-ntfy
Normal file
6
ct/headers/alpine-ntfy
Normal file
@ -0,0 +1,6 @@
|
||||
___ __ _ __ ____
|
||||
/ | / /___ (_)___ ___ ____ / /_/ __/_ __
|
||||
/ /| | / / __ \/ / __ \/ _ \______/ __ \/ __/ /_/ / / /
|
||||
/ ___ |/ / /_/ / / / / / __/_____/ / / / /_/ __/ /_/ /
|
||||
/_/ |_/_/ .___/_/_/ /_/\___/ /_/ /_/\__/_/ \__, /
|
||||
/_/ /____/
|
6
ct/headers/outline
Normal file
6
ct/headers/outline
Normal file
@ -0,0 +1,6 @@
|
||||
____ __ ___
|
||||
/ __ \__ __/ /_/ (_)___ ___
|
||||
/ / / / / / / __/ / / __ \/ _ \
|
||||
/ /_/ / /_/ / /_/ / / / / / __/
|
||||
\____/\__,_/\__/_/_/_/ /_/\___/
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE MODE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 14 60 2 \
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
67
ct/outline.sh
Normal file
67
ct/outline.sh
Normal file
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/outline/outline
|
||||
|
||||
APP="Outline"
|
||||
var_tags="${var_tags:-documentation}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/outline ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "outline" "outline/outline"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop outline
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
msg_info "Creating backup"
|
||||
cp /opt/outline/.env /opt
|
||||
msg_ok "Backup created"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "outline" "outline/outline" "tarball"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
cd /opt/outline
|
||||
mv /opt/.env /opt/outline
|
||||
export NODE_ENV=development
|
||||
export NODE_OPTIONS="--max-old-space-size=3584"
|
||||
$STD yarn install --frozen-lockfile
|
||||
export NODE_ENV=production
|
||||
$STD yarn build
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start outline
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated Successfully"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -18,7 +18,7 @@ var_fuse="${var_fuse:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
89
ct/tunarr.sh
89
ct/tunarr.sh
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: chrisbenincasa
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://tunarr.com/
|
||||
@ -11,59 +11,54 @@ var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-5}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/tunarr ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "tunarr" "chrisbenincasa/tunarr"; then
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop tunarr
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /usr/.local/share/tunarr
|
||||
msg_ok "Backup Created"
|
||||
|
||||
fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "singlefile" "latest" "/opt/tunarr" "*linux-x64"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start tunarr
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_ok "Updated Successfully"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg"; then
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop tunarr
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
fetch_and_deploy_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg" "prebuild" "latest" "/opt/ErsatzTV-ffmpeg" "*-linux64-gpl-7.1.tar.xz"
|
||||
|
||||
msg_info "Set ErsatzTV-ffmpeg links"
|
||||
chmod +x /opt/ErsatzTV-ffmpeg/bin/*
|
||||
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
|
||||
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffplay /usr/local/bin/ffplay
|
||||
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe
|
||||
msg_ok "ffmpeg links set"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start tunarr
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/tunarr ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "tunarr" "chrisbenincasa/tunarr"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop tunarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "singlefile" "latest" "/opt/tunarr" "*linux-x64"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start tunarr
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Update Successfully"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop tunarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg" "prebuild" "latest" "/opt/ErsatzTV-ffmpeg" "*-linux64-gpl-7.1.tar.xz"
|
||||
|
||||
msg_info "Set ErsatzTV-ffmpeg links"
|
||||
chmod +x /opt/ErsatzTV-ffmpeg/bin/*
|
||||
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
|
||||
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffplay /usr/local/bin/ffplay
|
||||
ln -sf /opt/ErsatzTV-ffmpeg/bin/ffprobe /usr/local/bin/ffprobe
|
||||
msg_ok "ffmpeg links set"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start tunarr
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Update Successfully"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
@ -19,7 +19,7 @@ var_unprivileged="${var_unprivileged:-0}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -14,7 +14,7 @@ header_info "$APP"
|
||||
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -22,7 +22,7 @@ base_settings
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/bvdberg01/ProxmoxVED/main/misc/build.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: BvdBerg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
@ -12,7 +12,7 @@
|
||||
"interface_port": 8000,
|
||||
"documentation": "https://tunarr.com/",
|
||||
"website": "https://tunarr.com/",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/tunarr.png",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tunarr.webp",
|
||||
"description": "Create a classic TV experience using your own media - IPTV backed by Plex/Jellyfin/Emby.",
|
||||
"install_methods": [
|
||||
{
|
||||
@ -23,7 +23,7 @@
|
||||
"ram": 1024,
|
||||
"hdd": 5,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -8,24 +8,14 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Caddy"
|
||||
$STD apk add --no-cache caddy caddy-openrc
|
||||
cat<<EOF>/etc/caddy/Caddyfile
|
||||
# The Caddyfile is an easy way to configure your Caddy web server.
|
||||
#
|
||||
# Unless the file starts with a global options block, the first
|
||||
# uncommented line is always the address of your site.
|
||||
#
|
||||
# To use your own domain name (with automatic HTTPS), first make
|
||||
# sure your domain's A/AAAA DNS records are properly pointed to
|
||||
# this machine's public IP, then replace ":80" below with your
|
||||
# domain name.
|
||||
|
||||
cat <<EOF >/etc/caddy/Caddyfile
|
||||
:80 {
|
||||
# Set this path to your site's directory.
|
||||
root * /var/www/html
|
||||
@ -39,12 +29,9 @@ cat<<EOF>/etc/caddy/Caddyfile
|
||||
# Or serve a PHP site through php-fpm:
|
||||
# php_fastcgi localhost:9000
|
||||
}
|
||||
|
||||
# Refer to the Caddy docs for more information:
|
||||
# https://caddyserver.com/docs/caddyfile
|
||||
EOF
|
||||
mkdir -p /var/www/html
|
||||
cat<<EOF>/var/www/html/index.html
|
||||
cat <<EOF >/var/www/html/index.html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -60,15 +47,15 @@ msg_ok "Installed Caddy"
|
||||
|
||||
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
|
||||
msg_info "Setup xCaddy"
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.tar.gz" -o "xcaddy_${RELEASE:1}_linux_amd64.tar.gz"
|
||||
$STD tar xzf xcaddy_"${RELEASE:1}"_linux_amd64.tar.gz -C /usr/local/bin xcaddy
|
||||
rm -rf /opt/xcaddy*
|
||||
$STD xcaddy build
|
||||
msg_ok "Setup xCaddy"
|
||||
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
|
||||
msg_info "Setup xCaddy"
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.tar.gz" -o "xcaddy_${RELEASE:1}_linux_amd64.tar.gz"
|
||||
$STD tar xzf xcaddy_"${RELEASE:1}"_linux_amd64.tar.gz -C /usr/local/bin xcaddy
|
||||
rm -rf /opt/xcaddy*
|
||||
$STD xcaddy build
|
||||
msg_ok "Setup xCaddy"
|
||||
fi
|
||||
|
||||
msg_info "Enabling Caddy Service"
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -9,7 +9,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -9,7 +9,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -9,7 +9,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -9,7 +9,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -10,7 +10,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@ source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -7,7 +7,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -7,7 +7,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -12,7 +12,7 @@ INSTALL_PATH="/opt/sng_freepbx_debian_install.sh"
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -9,7 +9,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -7,7 +7,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -7,7 +7,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
90
install/outline-install.sh
Normal file
90
install/outline-install.sh
Normal file
@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/outline/outline
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
mkcert \
|
||||
git \
|
||||
redis
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="20" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
PG_VERSION="16" setup_postgresql
|
||||
|
||||
msg_info "Set up PostgreSQL Database"
|
||||
DB_NAME="outline"
|
||||
DB_USER="outline"
|
||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$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 "Outline-Credentials"
|
||||
echo "Outline Database User: $DB_USER"
|
||||
echo "Outline Database Password: $DB_PASS"
|
||||
echo "Outline Database Name: $DB_NAME"
|
||||
} >>~/outline.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
fetch_and_deploy_gh_release "outline" "outline/outline" "tarball" "v0.87.3"
|
||||
|
||||
msg_info "Configuring Outline (Patience)"
|
||||
SECRET_KEY="$(openssl rand -hex 32)"
|
||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
||||
cd /opt/outline
|
||||
cp .env.sample .env
|
||||
export NODE_ENV=development
|
||||
sed -i 's/NODE_ENV=production/NODE_ENV=development/g' /opt/outline/.env
|
||||
sed -i "s/generate_a_new_key/${SECRET_KEY}/g" /opt/outline/.env
|
||||
sed -i "s/user:pass@postgres/${DB_USER}:${DB_PASS}@localhost/g" /opt/outline/.env
|
||||
sed -i 's/redis:6379/localhost:6379/g' /opt/outline/.env
|
||||
sed -i "5s#URL=#URL=http://${LOCAL_IP}#g" /opt/outline/.env
|
||||
sed -i 's/FORCE_HTTPS=true/FORCE_HTTPS=false/g' /opt/outline/.env
|
||||
export NODE_OPTIONS="--max-old-space-size=3584"
|
||||
$STD yarn install --frozen-lockfile
|
||||
export NODE_ENV=production
|
||||
sed -i 's/NODE_ENV=development/NODE_ENV=production/g' /opt/outline/.env
|
||||
$STD yarn build
|
||||
msg_ok "Configured Outline"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/outline.service
|
||||
[Unit]
|
||||
Description=Outline Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/outline
|
||||
ExecStart=/usr/bin/yarn start
|
||||
Restart=always
|
||||
EnvironmentFile=/opt/outline/.env
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now outline
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -8,7 +8,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
init_error_traps
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user