Compare commits

...

6 Commits

Author SHA1 Message Date
Slaviša Arežina
6ad1ea004f Open WebUI: reset code base before pulling update (#2948)
* fix: hard reset codebase before pulling

* backup data folder just in case

* bad path fix

* another safety layer

* final touches

* i'm dumb
2025-03-09 15:20:16 +01:00
community-scripts-pr-app[bot]
a640814ae0 Update CHANGELOG.md (#2954)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-09 13:25:08 +01:00
CanbiZ
89962b01fa Improve Release-Action (awk function) (#2934) 2025-03-09 12:48:19 +01:00
la7eralus
b0a06bdc5f Fix Pi-hole interface port in documentation (#2953) 2025-03-09 12:20:23 +01:00
community-scripts-pr-app[bot]
54fc60b60e Update CHANGELOG.md (#2952)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-09 09:16:09 +01:00
Adel Refaat
830634517b Fix copy db.sqlite when not exists (#2950) 2025-03-09 09:02:25 +01:00
5 changed files with 41 additions and 18 deletions

View File

@@ -14,32 +14,25 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Extract first 5000 characters from CHANGELOG.md - name: Clean CHANGELOG (remove HTML header)
run: head -c 5000 CHANGELOG.md > changelog_cropped.md run: sed -n '/^## /,$p' CHANGELOG.md > changelog_cleaned.md
- name: Debugging - Show extracted changelog
run: |
echo "=== CHANGELOG EXCERPT ==="
cat changelog_cropped.md
echo "========================="
- name: Extract relevant changelog section - name: Extract relevant changelog section
run: | run: |
YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
echo "Checking for changes on: $YESTERDAY" echo "Checking for changes on: $YESTERDAY"
# Extract relevant section from cropped changelog # Extract the section from "## $YESTERDAY" until the next "## YYYY-MM-DD"
awk -v date="## $YESTERDAY" ' sed -n "/^## $YESTERDAY/,/^## [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/p" changelog_cleaned.md | head -n -1 > changelog_tmp_full.md
$0 ~ date {found=1; next}
found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} # Truncate the extracted section to 5000 characters
found head -c 5000 changelog_tmp_full.md > changelog_tmp.md
' changelog_cropped.md > changelog_tmp.md
echo "=== Extracted Changelog ===" echo "=== Extracted Changelog ==="
cat changelog_tmp.md cat changelog_tmp.md
echo "===========================" echo "==========================="
# Skip if no content was found # Abort if no content was found
if [ ! -s changelog_tmp.md ]; then if [ ! -s changelog_tmp.md ]; then
echo "No changes found for $YESTERDAY, skipping release." echo "No changes found for $YESTERDAY, skipping release."
exit 0 exit 0

View File

@@ -14,6 +14,26 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
## 2025-03-09
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Fix wikijs update issue while backing up data [@AdelRefaat](https://github.com/AdelRefaat) ([#2950](https://github.com/community-scripts/ProxmoxVE/pull/2950))
### 🧰 Maintenance
- #### 🐞 Bug Fixes
- Improve Release-Action (awk function) [@MickLesk](https://github.com/MickLesk) ([#2934](https://github.com/community-scripts/ProxmoxVE/pull/2934))
### 🌐 Website
- #### 🐞 Bug Fixes
- Pi-hole interface port in documentation [@la7eralus](https://github.com/la7eralus) ([#2953](https://github.com/community-scripts/ProxmoxVE/pull/2953))
## 2025-03-08 ## 2025-03-08
### 🌐 Website ### 🌐 Website

View File

@@ -29,6 +29,11 @@ function update_script() {
fi fi
msg_info "Updating ${APP} (Patience)" msg_info "Updating ${APP} (Patience)"
cd /opt/open-webui cd /opt/open-webui
mkdir /opt/open-webui-backup
cp -rf /opt/open-webui/backend/data /opt/open-webui-backup
git add -A
$STD git stash
$STD git reset --hard
output=$(git pull --no-rebase) output=$(git pull --no-rebase)
if echo "$output" | grep -q "Already up to date."; then if echo "$output" | grep -q "Already up to date."; then
msg_ok "$APP is already up to date." msg_ok "$APP is already up to date."
@@ -40,6 +45,8 @@ function update_script() {
$STD npm run build $STD npm run build
cd ./backend cd ./backend
$STD pip install -r requirements.txt -U $STD pip install -r requirements.txt -U
cp -rf /opt/open-webui-backup/* /opt/open-webui/backend
$STD git stash pop
systemctl start open-webui.service systemctl start open-webui.service
msg_ok "Updated Successfully" msg_ok "Updated Successfully"
exit exit

View File

@@ -32,8 +32,11 @@ function update_script() {
msg_ok "Stopped ${APP}" msg_ok "Stopped ${APP}"
msg_info "Backing up Data" msg_info "Backing up Data"
rm -rf ~/data-backup
mkdir -p ~/data-backup mkdir -p ~/data-backup
cp -R /opt/wikijs/{db.sqlite,config.yml,/data} ~/data-backup [ -f /opt/wikijs/db.sqlite ] && cp /opt/wikijs/db.sqlite ~/data-backup
[ -f /opt/wikijs/config.yml ] && cp /opt/wikijs/config.yml ~/data-backup
[ -d /opt/wikijs/data ] && cp -R /opt/wikijs/data ~/data-backup
msg_ok "Backed up Data" msg_ok "Backed up Data"
msg_info "Updating ${APP}" msg_info "Updating ${APP}"

View File

@@ -8,7 +8,7 @@
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 81, "interface_port": 80,
"documentation": "https://docs.pi-hole.net/", "documentation": "https://docs.pi-hole.net/",
"website": "https://pi-hole.net/", "website": "https://pi-hole.net/",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/pi-hole.svg", "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/pi-hole.svg",