mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-10 09:49:18 +00:00
Compare commits
75 Commits
b3fd16a200
...
087a054956
Author | SHA1 | Date | |
---|---|---|---|
|
087a054956 | ||
|
3051720f58 | ||
|
1932f5ebcc | ||
|
ca391d7448 | ||
|
376fd6522a | ||
|
5855cff8e4 | ||
|
6981774662 | ||
|
4ead90ef0b | ||
|
5fc7885347 | ||
|
e3d0fb58c9 | ||
|
9b2180857d | ||
|
5d7e524578 | ||
|
ad3214acfb | ||
|
5090b62113 | ||
|
a0eb6b860c | ||
|
9a4d35b1f2 | ||
|
b7a8d3453a | ||
|
111436c0a0 | ||
|
0c0225a052 | ||
|
aacb6ca2c9 | ||
|
7218c3b90a | ||
|
32bc4a3ab5 | ||
|
51cbfbdc4f | ||
|
d227277311 | ||
|
0d2db00dc6 | ||
|
1a9320ced8 | ||
|
d8931fef4d | ||
|
70ab9ab09e | ||
|
02f480998e | ||
|
860c541606 | ||
|
31b253e99f | ||
|
8c6f0ac1de | ||
|
cfda535a58 | ||
|
5d6bba3db8 | ||
|
7a2f5f55e8 | ||
|
f275cdd62c | ||
|
cb60c7fed2 | ||
|
88336a2c3b | ||
|
34f375032a | ||
|
0c44d2d23c | ||
|
f7d9fe7c3a | ||
|
2dddbaebe4 | ||
|
7930764ece | ||
|
42375390d6 | ||
|
cb8372da3d | ||
|
2c4a61d828 | ||
|
14cbba17f3 | ||
|
2ba1bfa3f1 | ||
|
24722c7eb8 | ||
|
a1422379bd | ||
|
2e64b89a9b | ||
|
bcf981cb33 | ||
|
09f060eb69 | ||
|
7c08ec1fc6 | ||
|
6e56610e28 | ||
|
ece84cbe70 | ||
|
bd5cd844bf | ||
|
84042b7508 | ||
|
d411d965bd | ||
|
ef44c2d243 | ||
|
86b91f626c | ||
|
a65b9c7ba3 | ||
|
a46503209f | ||
|
a78633a0a4 | ||
|
5d0fa7aa16 | ||
|
4a3d4a055d | ||
|
10927e39ce | ||
|
6fc78dca57 | ||
|
7dc54da8a3 | ||
|
45f241df2e | ||
|
535a1b0250 | ||
|
4b6b560bbd | ||
|
aa3da01005 | ||
|
97fb7941f8 | ||
|
626aa2f79e |
66
.github/workflows/App_Header_Merge_Into_main.yaml
vendored
Normal file
66
.github/workflows/App_Header_Merge_Into_main.yaml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
name: Auto Update .app-headers and Create PR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'ct/**.sh'
|
||||
|
||||
jobs:
|
||||
update-app-headers:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Step 1: Checkout the repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Step 2: Set up Git user for committing changes
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions"
|
||||
git config --global user.email "actions@github.com"
|
||||
|
||||
# Step 3: Ensure .app-headers file exists
|
||||
- name: Ensure .app-headers file exists
|
||||
run: |
|
||||
if [ ! -f ct/.app-headers ]; then
|
||||
echo "Creating .app-headers file."
|
||||
touch ct/.app-headers
|
||||
fi
|
||||
|
||||
# Step 4: Process the ct/*.sh files and update .app-headers
|
||||
- name: Update .app-headers with figlet output
|
||||
run: |
|
||||
echo "Updating .app-headers with figlet output."
|
||||
for script in ct/*.sh; do
|
||||
if grep -q 'APP=' "$script"; then
|
||||
APP_NAME=$(grep -oP 'APP=\K\w+' "$script")
|
||||
echo "Processing $script for APP: \"$APP_NAME\""
|
||||
figlet "$APP_NAME" >> ct/.app-headers
|
||||
fi
|
||||
done
|
||||
|
||||
# Step 5: Check out and merge main into the update-app-headers branch without committing
|
||||
- name: Merge main into update-app-headers
|
||||
run: |
|
||||
git fetch origin
|
||||
git checkout update-app-headers
|
||||
git merge origin/main --no-ff --no-commit -m "Merge main into update-app-headers"
|
||||
echo "Merge complete. Please review and commit the changes manually."
|
||||
|
||||
# Step 6: Check if a PR exists and create one if it doesn't
|
||||
- name: Create Pull Request if not exists
|
||||
run: |
|
||||
PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number')
|
||||
|
||||
if [ -z "$PR_EXISTS" ]; then
|
||||
echo "Creating a new PR."
|
||||
PR_URL=$(gh pr create --title "[core]: update .app-headers to latest version" \
|
||||
--body "This PR automatically updates the .app-headers file." \
|
||||
--head update-app-headers \
|
||||
--base main)
|
||||
echo "PR created: $PR_URL"
|
||||
else
|
||||
echo "PR already exists."
|
||||
fi
|
34
.github/workflows/App_Header_Merge_update .app-headers_in_update-app-headers
vendored
Normal file
34
.github/workflows/App_Header_Merge_update .app-headers_in_update-app-headers
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Update .app-headers with figlet output
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Merge main into update-app-headers"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
update-app-headers:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Ensure .app-headers file exists silently
|
||||
run: |
|
||||
if [ ! -f ct/.app-headers ]; then
|
||||
touch ct/.app-headers
|
||||
fi
|
||||
|
||||
- name: Update .app-headers with figlet output silently
|
||||
run: |
|
||||
for script in ct/*.sh; do
|
||||
if grep -q 'APP=' "$script"; then
|
||||
APP_NAME=$(grep -oP 'APP=\K\w+' "$script")
|
||||
if [ ! -z "$APP_NAME" ]; then
|
||||
echo "Adding $APP_NAME to .app-headers"
|
||||
figlet "$APP_NAME" >> ct/.app-headers 2>/dev/null || echo "figlet failed for $APP_NAME"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
45
.github/workflows/check_and_update_json_date.yml
vendored
Normal file
45
.github/workflows/check_and_update_json_date.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: Check and Update JSON Date
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [synchronize, opened, reopened, edited]
|
||||
paths:
|
||||
- "json/*.json"
|
||||
|
||||
jobs:
|
||||
update-date:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install jq
|
||||
|
||||
- name: Find and Update JSON files in /json folder
|
||||
run: |
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
for file in $(git diff --diff-filter=A --name-only HEAD | grep '^json/.*\.json$'); do
|
||||
if jq -e '.date_created' $file > /dev/null 2>&1; then
|
||||
echo "Updating date_created in $file"
|
||||
jq --arg date "$TODAY" '.date_created = $date' $file > temp.json && mv temp.json $file
|
||||
git add $file
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config user.name "GitHub Action"
|
||||
git config user.email "action@github.com"
|
||||
git commit -m "Update date_created in new JSON files" || echo "No changes to commit"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@v0.6.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
41
.github/workflows/generate-app-headers.yaml
vendored
41
.github/workflows/generate-app-headers.yaml
vendored
@ -1,41 +0,0 @@
|
||||
name: Update .app-headers in /misc
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-combined:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Generate a token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ secrets.CREATE_HEADER_APP_ID }}
|
||||
private-key: ${{ secrets.CREATE_HEADER_SECRET }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Figlet
|
||||
run: sudo apt-get install -y figlet
|
||||
|
||||
- name: Run generate-app-headers script
|
||||
run: |
|
||||
bash .github/workflows/generate-app-headers.sh
|
||||
|
||||
- name: Commit and push changes
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add ./misc/.app-headers
|
||||
git commit -m "Update .app-headers in /misc" || echo "No changes to commit"
|
||||
git push origin main
|
29
.github/workflows/merge-main.yml
vendored
Normal file
29
.github/workflows/merge-main.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Merge main into update-app-headers
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'ct/**.sh'
|
||||
|
||||
jobs:
|
||||
merge-main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions"
|
||||
git config --global user.email "actions@github.com"
|
||||
|
||||
- name: Merge main into update-app-headers silently
|
||||
run: |
|
||||
git fetch origin
|
||||
git checkout update-app-headers
|
||||
git merge origin/main --allow-unrelated-histories --no-commit -m "Merge main into update-app-headers"
|
||||
git push origin update-app-headers > /dev/null 2>&1 || true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"bmalehorn.shell-syntax",
|
||||
"timonwong.shellcheck",
|
||||
"foxundermoon.shell-format"
|
||||
],
|
||||
"unwantedRecommendations": []
|
||||
}
|
15
CHANGELOG.md
15
CHANGELOG.md
@ -20,9 +20,18 @@ Do not break established syntax in this file, as it is automatically updated by
|
||||
|
||||
### Changed
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New script : Ghost [@fabrice1236](https://github.com/fabrice1236) ([#1361](https://github.com/community-scripts/ProxmoxVE/pull/1361))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Fix user in ghost-cli install command [@fabrice1236](https://github.com/fabrice1236) ([#1408](https://github.com/community-scripts/ProxmoxVE/pull/1408))
|
||||
- Update Prometheus + Alertmanager: Unify scripts for easier maintenance [@andygrunwald](https://github.com/andygrunwald) ([#1402](https://github.com/community-scripts/ProxmoxVE/pull/1402))
|
||||
- Update komodo.sh: Fix broken paths in update_script(). [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1403](https://github.com/community-scripts/ProxmoxVE/pull/1403))
|
||||
- Fix: ActualBudget Update-Function [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1376](https://github.com/community-scripts/ProxmoxVE/pull/1376))
|
||||
- Fix: bookstack.sh - Ignore empty folder [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1388](https://github.com/community-scripts/ProxmoxVE/pull/1388))
|
||||
- Fix: checkmk-install.sh: Version crawling. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1385](https://github.com/community-scripts/ProxmoxVE/pull/1385))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
@ -30,8 +39,12 @@ Do not break established syntax in this file, as it is automatically updated by
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- [Core] add Github Action for Generate AppHeaders (figlet remove part 1) [@MickLesk](https://github.com/MickLesk) ([#1382](https://github.com/community-scripts/ProxmoxVE/pull/1382))
|
||||
- Update check_and_update_json_date.yml: Change path to /json [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1399](https://github.com/community-scripts/ProxmoxVE/pull/1399))
|
||||
- Visual Studio Code: Set Workspace recommended extensions [@andygrunwald](https://github.com/andygrunwald) ([#1398](https://github.com/community-scripts/ProxmoxVE/pull/1398))
|
||||
- [core]: add support for custom tags [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1384](https://github.com/community-scripts/ProxmoxVE/pull/1384))
|
||||
- [core]: check json date of new prs & update it [@MickLesk](https://github.com/MickLesk) ([#1395](https://github.com/community-scripts/ProxmoxVE/pull/1395))
|
||||
- Add initial PR for Contributing & Coding Standard [@MickLesk](https://github.com/MickLesk) ([#920](https://github.com/community-scripts/ProxmoxVE/pull/920))
|
||||
- [Core] add Github Action for Generate AppHeaders (figlet remove part 1) [@MickLesk](https://github.com/MickLesk) ([#1382](https://github.com/community-scripts/ProxmoxVE/pull/1382))
|
||||
|
||||
## 2025-01-09
|
||||
|
||||
|
@ -44,9 +44,9 @@ function update_script() {
|
||||
unzip -q /opt/v${RELEASE}.zip -d /opt
|
||||
mv /opt/BookStack-${RELEASE} /opt/bookstack
|
||||
cp /opt/bookstack-backup/.env /opt/bookstack/.env
|
||||
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/
|
||||
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/
|
||||
cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/
|
||||
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ 2>/dev/null || true
|
||||
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ 2>/dev/null || true
|
||||
cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ 2>/dev/null || true
|
||||
cd /opt/bookstack
|
||||
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev &>/dev/null
|
||||
php artisan migrate --force &>/dev/null
|
||||
|
57
ct/ghost.sh
Normal file
57
ct/ghost.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: fabrice1236
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://ghost.org/
|
||||
|
||||
# App Default Values
|
||||
APP="Ghost"
|
||||
var_tags="cms;blog"
|
||||
var_cpu="2"
|
||||
var_ram="1024"
|
||||
var_disk="5"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
msg_info "Updating ${APP} LXC"
|
||||
|
||||
if command -v ghost &> /dev/null; then
|
||||
current_version=$(ghost version | grep 'Ghost-CLI version' | awk '{print $3}')
|
||||
latest_version=$(npm show ghost-cli version)
|
||||
if [ "$current_version" != "$latest_version" ]; then
|
||||
msg_info "Updating ${APP} from version v${current_version} to v${latest_version}"
|
||||
npm install -g ghost-cli@latest &> /dev/null
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "${APP} is already at v${current_version}"
|
||||
fi
|
||||
else
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
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}:2368${CL}"
|
14
ct/komodo.sh
14
ct/komodo.sh
@ -34,9 +34,9 @@ function update_script() {
|
||||
fi
|
||||
msg_info "Updating ${APP}"
|
||||
COMPOSE_FILE=""
|
||||
for file in *.compose.yaml; do
|
||||
for file in /opt/komodo/*.compose.yaml; do
|
||||
if [[ "$file" != "compose.env" ]]; then
|
||||
COMPOSE_FILE="$file"
|
||||
COMPOSE_FILE="${file#/opt/komodo/}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -47,15 +47,15 @@ function update_script() {
|
||||
fi
|
||||
|
||||
BACKUP_FILE="${COMPOSE_FILE}.bak_$(date +%Y%m%d_%H%M%S)"
|
||||
mv "$COMPOSE_FILE" "$BACKUP_FILE" || {
|
||||
mv "/opt/komodo/$COMPOSE_FILE" "/opt/komodo/$BACKUP_FILE" || {
|
||||
msg_error "Failed to create backup of $COMPOSE_FILE!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
GITHUB_URL="https://raw.githubusercontent.com/mbecker20/komodo/main/compose/$COMPOSE_FILE"
|
||||
wget -q -O "$COMPOSE_FILE" "$GITHUB_URL" || {
|
||||
msg_error "Failed to download $COMPOSE_FILE from GitHub!"
|
||||
mv "$BACKUP_FILE" "$COMPOSE_FILE"
|
||||
GITHUB_URL="https://raw.githubusercontent.com/mbecker20/komodo/main/compose/${COMPOSE_FILE}"
|
||||
wget -q -O "/opt/komodo/${COMPOSE_FILE}" "$GITHUB_URL" || {
|
||||
msg_error "Failed to download ${COMPOSE_FILE} from GitHub!"
|
||||
mv "/opt/komodo/${BACKUP_FILE}" "/opt/komodo/${COMPOSE_FILE}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -42,18 +42,17 @@ function update_script() {
|
||||
cd /opt
|
||||
wget -q https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-amd64.tar.gz
|
||||
tar -xf alertmanager-${RELEASE}.linux-amd64.tar.gz
|
||||
cd alertmanager-${RELEASE}.linux-amd64
|
||||
cp -rf alertmanager amtool /usr/local/bin/
|
||||
cp -rf alertmanager-${RELEASE}.linux-amd64/alertmanager alertmanager-${RELEASE}.linux-amd64/amtool /usr/local/bin/
|
||||
rm -rf alertmanager-${RELEASE}.linux-amd64 alertmanager-${RELEASE}.linux-amd64.tar.gz
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start prometheus-alertmanager
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://prometheus.io/
|
||||
@ -38,22 +38,21 @@ function update_script() {
|
||||
systemctl stop prometheus
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
wget -q https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-amd64.tar.gz
|
||||
tar -xf prometheus-${RELEASE}.linux-amd64.tar.gz
|
||||
cd prometheus-${RELEASE}.linux-amd64
|
||||
cp -rf prometheus promtool /usr/local/bin/
|
||||
cd ~
|
||||
cp -rf prometheus-${RELEASE}.linux-amd64/prometheus prometheus-${RELEASE}.linux-amd64/promtool /usr/local/bin/
|
||||
rm -rf prometheus-${RELEASE}.linux-amd64 prometheus-${RELEASE}.linux-amd64.tar.gz
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start prometheus
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
11
ct/tianji.sh
11
ct/tianji.sh
@ -36,7 +36,8 @@ function update_script() {
|
||||
msg_info "Stopping ${APP} Service"
|
||||
systemctl stop tianji
|
||||
msg_ok "Stopped ${APP} Service"
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
cp /opt/tianji/src/server/.env /opt/.env
|
||||
mv /opt/tianji /opt/tianji_bak
|
||||
@ -54,10 +55,12 @@ function update_script() {
|
||||
cd src/server
|
||||
pnpm db:migrate:apply >/dev/null 2>&1
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start tianji
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -R /opt/v${RELEASE}.zip
|
||||
rm -rf /opt/tianji_bak
|
||||
@ -67,7 +70,7 @@ function update_script() {
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}."
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}."
|
||||
fi
|
||||
exit
|
||||
}
|
||||
@ -79,4 +82,4 @@ 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}:12345${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:12345${CL}"
|
||||
|
@ -55,7 +55,7 @@ function update_script() {
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
@ -67,4 +67,4 @@ 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}:8088${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8088${CL}"
|
||||
|
@ -22,7 +22,7 @@ $STD apt-get install -y \
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Install Checkmk"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | head -n 1)
|
||||
wget -q https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb -O /opt/checkmk.deb
|
||||
$STD apt-get install -y /opt/checkmk.deb
|
||||
echo "${RELEASE}" >"/opt/checkmk_version.txt"
|
||||
|
78
install/ghost-install.sh
Normal file
78
install/ghost-install.sh
Normal file
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: fabrice1236
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://ghost.org/
|
||||
|
||||
# Import Functions und Setup
|
||||
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 \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
nginx \
|
||||
mariadb-server \
|
||||
ca-certificates \
|
||||
gnupg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
msg_info "Configuring Database"
|
||||
DB_NAME=ghost
|
||||
DB_USER=ghostuser
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
|
||||
{
|
||||
echo "Ghost-Credentials"
|
||||
echo "Ghost Database User: $DB_USER"
|
||||
echo "Ghost Database Password: $DB_PASS"
|
||||
echo "Ghost Database Name: $DB_NAME"
|
||||
} >> ~/ghost.creds
|
||||
msg_ok "Configured MySQL"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Set up Node.js Repository"
|
||||
|
||||
msg_info "Setup Node.js"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
msg_ok "Setup Node.js"
|
||||
|
||||
msg_info "Installing Ghost CLI"
|
||||
$STD npm install ghost-cli@latest -g
|
||||
msg_ok "Installed Ghost CLI"
|
||||
|
||||
msg_info "Creating Service"
|
||||
$STD adduser --disabled-password --gecos "Ghost user" ghost-user
|
||||
$STD usermod -aG sudo ghost-user
|
||||
echo "ghost-user ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/ghost-user
|
||||
mkdir -p /var/www/ghost
|
||||
chown -R ghost-user:ghost-user /var/www/ghost
|
||||
chmod 775 /var/www/ghost
|
||||
sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=$DB_USER --dbpass=$DB_PASS --dbname=ghost --url=http://localhost:2368 --no-prompt --no-setup-nginx --no-setup-ssl --no-setup-mysql --enable --start --ip 0.0.0.0"
|
||||
rm /etc/sudoers.d/ghost-user
|
||||
msg_ok "Creating Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://prometheus.io/
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@ -14,9 +14,10 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Prometheus"
|
||||
@ -25,14 +26,13 @@ mkdir -p /etc/prometheus
|
||||
mkdir -p /var/lib/prometheus
|
||||
wget -q https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-amd64.tar.gz
|
||||
tar -xf prometheus-${RELEASE}.linux-amd64.tar.gz
|
||||
cd prometheus-${RELEASE}.linux-amd64
|
||||
mv prometheus promtool /usr/local/bin/
|
||||
mv prometheus.yml /etc/prometheus/prometheus.yml
|
||||
mv prometheus-${RELEASE}.linux-amd64/prometheus prometheus-${RELEASE}.linux-amd64/promtool /usr/local/bin/
|
||||
mv prometheus-${RELEASE}.linux-amd64/prometheus.yml /etc/prometheus/prometheus.yml
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Prometheus"
|
||||
|
||||
msg_info "Creating Service"
|
||||
service_path="/etc/systemd/system/prometheus.service"
|
||||
cat <<EOF >/etc/systemd/system/prometheus.service"
|
||||
echo "[Unit]
|
||||
Description=Prometheus
|
||||
Wants=network-online.target
|
||||
@ -49,7 +49,8 @@ ExecStart=/usr/local/bin/prometheus \
|
||||
ExecReload=/bin/kill -HUP \$MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target" >$service_path
|
||||
WantedBy=multi-user.target"
|
||||
EOF
|
||||
systemctl enable -q --now prometheus
|
||||
msg_ok "Created Service"
|
||||
|
||||
@ -59,5 +60,5 @@ customize
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
rm -rf ../prometheus-${RELEASE}.linux-amd64 ../prometheus-${RELEASE}.linux-amd64.tar.gz
|
||||
rm -rf prometheus-${RELEASE}.linux-amd64 prometheus-${RELEASE}.linux-amd64.tar.gz
|
||||
msg_ok "Cleaned"
|
||||
|
41
json/ghost.json
Normal file
41
json/ghost.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "Ghost",
|
||||
"slug": "ghost",
|
||||
"categories": [
|
||||
12
|
||||
],
|
||||
"date_created": "2025-01-10",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 2368,
|
||||
"documentation": "https://ghost.org/docs/",
|
||||
"website": "https://ghost.org",
|
||||
"logo": "https://raw.githubusercontent.com/TryGhost/Ghost/b6fe724b577e84f7dd174646d0323dabdcdf576e/apps/shade/src/assets/images/ghost-orb.svg",
|
||||
"description": "Ghost is a powerful app for professional publishers to create, share, and grow a business around their content. It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/ghost.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 1024,
|
||||
"hdd": 5,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "To run Ghost-CLI commands, first set a password for the ghost-user by running `sudo passwd ghost-user`. Then, switch to the ghost-user with `sudo -su ghost-user`.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
2013
misc/.app-headers
Normal file
2013
misc/.app-headers
Normal file
File diff suppressed because it is too large
Load Diff
@ -626,6 +626,17 @@ advanced_settings() {
|
||||
exit_script
|
||||
fi
|
||||
|
||||
if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then
|
||||
if [ -n "${ADV_TAGS}" ]; then
|
||||
ADV_TAGS=${ADV_TAGS:-""}
|
||||
ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]')
|
||||
TAGS="community-script;${ADV_TAGS}"
|
||||
fi
|
||||
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
|
||||
if [[ "$PW" == -password* ]]; then
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||
SSH="yes"
|
||||
|
Loading…
Reference in New Issue
Block a user