mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-04 10:22:50 +00:00
Compare commits
131 Commits
2025-08-30
...
2025-09-09
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7adf1a9b5 | ||
|
|
36fb86eaf8 | ||
|
|
495c47224e | ||
|
|
7af71384b4 | ||
|
|
e318152ee3 | ||
|
|
17dc7c90a1 | ||
|
|
226a5bce8f | ||
|
|
ffd2ed01b9 | ||
|
|
3348e2fff0 | ||
|
|
def41f66f4 | ||
|
|
02a1a732f8 | ||
|
|
2494af7e1c | ||
|
|
0c4711d99f | ||
|
|
039f73a5ed | ||
|
|
74b58d5b10 | ||
|
|
61044104a2 | ||
|
|
fac612077a | ||
|
|
135b3ff964 | ||
|
|
393b853119 | ||
|
|
6bb2938e34 | ||
|
|
fbf16fd54d | ||
|
|
d6d4fd034f | ||
|
|
aa4999dac6 | ||
|
|
b6c0b50e79 | ||
|
|
0f07f1927e | ||
|
|
4493d86e51 | ||
|
|
fbfeeeb88f | ||
|
|
2366111bba | ||
|
|
5fb42b87f1 | ||
|
|
500c35c58d | ||
|
|
ca3446c90e | ||
|
|
4c3d42d5d1 | ||
|
|
299a10efe8 | ||
|
|
7adac2a342 | ||
|
|
eb58b10d75 | ||
|
|
5e46d81c45 | ||
|
|
2963926c45 | ||
|
|
d9a0b863a8 | ||
|
|
db6369f3c6 | ||
|
|
d450e263f0 | ||
|
|
462960d9bf | ||
|
|
8ea4829e8a | ||
|
|
c5d23dc883 | ||
|
|
3dc973e4ac | ||
|
|
751f488f9e | ||
|
|
0ed4363247 | ||
|
|
e77612c27e | ||
|
|
59c8e214af | ||
|
|
c790f03a6b | ||
|
|
54d4d58b15 | ||
|
|
889a58c00e | ||
|
|
e9a5d7587a | ||
|
|
6f84046741 | ||
|
|
ff96351db8 | ||
|
|
1b632199b3 | ||
|
|
9fb02a93b4 | ||
|
|
3aa56651d8 | ||
|
|
17d4c59041 | ||
|
|
2bfb35779b | ||
|
|
83b93390c9 | ||
|
|
7ce47ad414 | ||
|
|
646e0c31f4 | ||
|
|
0c7e200a94 | ||
|
|
a9b02b3e9c | ||
|
|
b62adc2c5c | ||
|
|
3438b046e5 | ||
|
|
cbd6d6d0f3 | ||
|
|
cf6c429c57 | ||
|
|
bbe71cbbb9 | ||
|
|
9b6a736c8c | ||
|
|
c395ccc270 | ||
|
|
3dd72e08e9 | ||
|
|
1d989bea73 | ||
|
|
f881b88344 | ||
|
|
06dbad83ef | ||
|
|
7ff966b042 | ||
|
|
62264f37a6 | ||
|
|
bf05dabc4c | ||
|
|
bc229d9738 | ||
|
|
969b08caa8 | ||
|
|
c1c43ed2cb | ||
|
|
e74767d1a4 | ||
|
|
e9e17f4f51 | ||
|
|
2c1b15a40e | ||
|
|
a4bfaf1646 | ||
|
|
6fa12cc814 | ||
|
|
d314168a37 | ||
|
|
d6ad11c5c2 | ||
|
|
534592b44a | ||
|
|
d9b6b58b36 | ||
|
|
298eb7e83d | ||
|
|
c2dd1e413f | ||
|
|
a4f1766408 | ||
|
|
a24169e9b8 | ||
|
|
45a2163e66 | ||
|
|
2fc3e62d60 | ||
|
|
210b846d61 | ||
|
|
b04cfb65f7 | ||
|
|
6a2fc4083b | ||
|
|
f7f53943c2 | ||
|
|
31f4d9b16c | ||
|
|
cd4cd5eec1 | ||
|
|
8a7eeee727 | ||
|
|
be5d65f421 | ||
|
|
591af3f109 | ||
|
|
a3e0df9de1 | ||
|
|
596699d07e | ||
|
|
b2275b44c2 | ||
|
|
737842fb1e | ||
|
|
646cb2bc30 | ||
|
|
4599bfe052 | ||
|
|
bb85b1d4ac | ||
|
|
57ae4a48a7 | ||
|
|
06e8460851 | ||
|
|
9713c95bf4 | ||
|
|
705748bba5 | ||
|
|
022f079821 | ||
|
|
80d75731a8 | ||
|
|
227721a72f | ||
|
|
5572a7a0ab | ||
|
|
6a69185a2d | ||
|
|
77441b6189 | ||
|
|
4aa337c2f2 | ||
|
|
4bd2f6866a | ||
|
|
377de80103 | ||
|
|
1c62d4614e | ||
|
|
a91f7410a4 | ||
|
|
528c0a8de5 | ||
|
|
988bd3ef19 | ||
|
|
99d9664ae4 | ||
|
|
09649eb5b1 |
187
CHANGELOG.md
187
CHANGELOG.md
@@ -10,8 +10,195 @@
|
||||
> [!CAUTION]
|
||||
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
|
||||
|
||||
## 2025-09-10
|
||||
|
||||
## 2025-09-09
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Tududi: v0.81 [@vhsdream](https://github.com/vhsdream) ([#7517](https://github.com/community-scripts/ProxmoxVE/pull/7517))
|
||||
- WGDashboard: Revert back to old update method [@tremor021](https://github.com/tremor021) ([#7500](https://github.com/community-scripts/ProxmoxVE/pull/7500))
|
||||
- AdventureLog: remove folder during update process [@MickLesk](https://github.com/MickLesk) ([#7507](https://github.com/community-scripts/ProxmoxVE/pull/7507))
|
||||
- PLANKA: Fix backup and restore commands [@tremor021](https://github.com/tremor021) ([#7505](https://github.com/community-scripts/ProxmoxVE/pull/7505))
|
||||
- Recyclarr: Suppress config creation output [@tremor021](https://github.com/tremor021) ([#7502](https://github.com/community-scripts/ProxmoxVE/pull/7502))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Pulse: standardise install/update with Pulse repo script [@vhsdream](https://github.com/vhsdream) ([#7519](https://github.com/community-scripts/ProxmoxVE/pull/7519))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Refactor GitHubStarsButton to wrap in Link component for external navigation [@BramSuurdje](https://github.com/BramSuurdje) ([#7492](https://github.com/community-scripts/ProxmoxVE/pull/7492))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Bump vite from 7.0.0 to 7.1.5 in /frontend [@dependabot[bot]](https://github.com/dependabot[bot]) ([#7522](https://github.com/community-scripts/ProxmoxVE/pull/7522))
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- swizzin: Change category from nvr to media [@MickLesk](https://github.com/MickLesk) ([#7511](https://github.com/community-scripts/ProxmoxVE/pull/7511))
|
||||
|
||||
## 2025-09-08
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- CT's: fix missing variable declaration (actualBudget, openziti, umlautadaptarr) [@MickLesk](https://github.com/MickLesk) ([#7483](https://github.com/community-scripts/ProxmoxVE/pull/7483))
|
||||
- karakeep: fix service file [@CrazyWolf13](https://github.com/CrazyWolf13) ([#7482](https://github.com/community-scripts/ProxmoxVE/pull/7482))
|
||||
- Update searxng-install.sh [@sebguy](https://github.com/sebguy) ([#7469](https://github.com/community-scripts/ProxmoxVE/pull/7469))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Immich: bump to version 1.141.1 [@vhsdream](https://github.com/vhsdream) ([#7418](https://github.com/community-scripts/ProxmoxVE/pull/7418))
|
||||
- [core]: switch all base_settings to variables [@MickLesk](https://github.com/MickLesk) ([#7479](https://github.com/community-scripts/ProxmoxVE/pull/7479))
|
||||
|
||||
- #### 💥 Breaking Changes
|
||||
|
||||
- RustDesk Server: Update the credentials info [@tremor021](https://github.com/tremor021) ([#7473](https://github.com/community-scripts/ProxmoxVE/pull/7473))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Format numerical values in DataFetcher component for better readability [@BramSuurdje](https://github.com/BramSuurdje) ([#7477](https://github.com/community-scripts/ProxmoxVE/pull/7477))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- feat: enhance github stars button to be better looking and more compact [@BramSuurdje](https://github.com/BramSuurdje) ([#7464](https://github.com/community-scripts/ProxmoxVE/pull/7464))
|
||||
|
||||
## 2025-09-07
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Update ExecStart path for karakeep service [@CrazyWolf13](https://github.com/CrazyWolf13) ([#7460](https://github.com/community-scripts/ProxmoxVE/pull/7460))
|
||||
|
||||
## 2025-09-06
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Resilio Sync ([#7442](https://github.com/community-scripts/ProxmoxVE/pull/7442))
|
||||
- leantime ([#7414](https://github.com/community-scripts/ProxmoxVE/pull/7414))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- use debian source for direct installation of MQTT [@EtlamGit](https://github.com/EtlamGit) ([#7423](https://github.com/community-scripts/ProxmoxVE/pull/7423))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- feat: added mobile ui subscription nag removal [@ivan-penchev](https://github.com/ivan-penchev) ([#7164](https://github.com/community-scripts/ProxmoxVE/pull/7164))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- MediaManager Configuration Path [@austinpilz](https://github.com/austinpilz) ([#7408](https://github.com/community-scripts/ProxmoxVE/pull/7408))
|
||||
- Paperless-NGX: Remove default credentials from json [@tremor021](https://github.com/tremor021) ([#7403](https://github.com/community-scripts/ProxmoxVE/pull/7403))
|
||||
|
||||
## 2025-09-05
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Tududi: Pin version to 0.80 [@vhsdream](https://github.com/vhsdream) ([#7420](https://github.com/community-scripts/ProxmoxVE/pull/7420))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- AdventureLog: Update dependencies [@tremor021](https://github.com/tremor021) ([#7404](https://github.com/community-scripts/ProxmoxVE/pull/7404))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- refactor: Enhance ScriptAccordion and Sidebar components to support selectedCategory state [@BramSuurdje](https://github.com/BramSuurdje) ([#7405](https://github.com/community-scripts/ProxmoxVE/pull/7405))
|
||||
|
||||
## 2025-09-04
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix: Syntax error in Immich scripts [@henworth](https://github.com/henworth) ([#7398](https://github.com/community-scripts/ProxmoxVE/pull/7398))
|
||||
- Netdata: Fix pve_check for 8 [@MickLesk](https://github.com/MickLesk) ([#7392](https://github.com/community-scripts/ProxmoxVE/pull/7392))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Immich: pin compiled photo library revisions [@vhsdream](https://github.com/vhsdream) ([#7395](https://github.com/community-scripts/ProxmoxVE/pull/7395))
|
||||
|
||||
## 2025-09-03
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Element-Synapse: Increase HDD size [@tremor021](https://github.com/tremor021) ([#7384](https://github.com/community-scripts/ProxmoxVE/pull/7384))
|
||||
- Wizarr: fix uv lock issue; use correct output suppression [@vhsdream](https://github.com/vhsdream) ([#7378](https://github.com/community-scripts/ProxmoxVE/pull/7378))
|
||||
- Netbox: Fix missing directory [@tremor021](https://github.com/tremor021) ([#7374](https://github.com/community-scripts/ProxmoxVE/pull/7374))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Enhanced IP-Tag installation script with interactive configuration, improved VM IP detection, and better visual indicators [@DesertGamer](https://github.com/DesertGamer) ([#7366](https://github.com/community-scripts/ProxmoxVE/pull/7366))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix navigation [@BramSuurdje](https://github.com/BramSuurdje) ([#7376](https://github.com/community-scripts/ProxmoxVE/pull/7376))
|
||||
|
||||
## 2025-09-02
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Increase default disk size for Apt-Cacher-NG [@MickLesk](https://github.com/MickLesk) ([#7352](https://github.com/community-scripts/ProxmoxVE/pull/7352))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Snipe-IT: Fix Nginx configuration [@tremor021](https://github.com/tremor021) ([#7358](https://github.com/community-scripts/ProxmoxVE/pull/7358))
|
||||
- booklore: remove folder before update [@MickLesk](https://github.com/MickLesk) ([#7351](https://github.com/community-scripts/ProxmoxVE/pull/7351))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Immich: bump version to 1.140.1 [@vhsdream](https://github.com/vhsdream) ([#7349](https://github.com/community-scripts/ProxmoxVE/pull/7349))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- pbs: increase note on website for ipv6 [@MickLesk](https://github.com/MickLesk) ([#7339](https://github.com/community-scripts/ProxmoxVE/pull/7339))
|
||||
|
||||
## 2025-09-01
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Update configarr.sh to mv backep up .env correctly [@finkerle](https://github.com/finkerle) ([#7323](https://github.com/community-scripts/ProxmoxVE/pull/7323))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Refactor + Feature Bump: HomeAssistant OS [@MickLesk](https://github.com/MickLesk) ([#7336](https://github.com/community-scripts/ProxmoxVE/pull/7336))
|
||||
- UmbrelOS: Refactor / use q35 / better import [@MickLesk](https://github.com/MickLesk) ([#7329](https://github.com/community-scripts/ProxmoxVE/pull/7329))
|
||||
- Harmonize GH Release Check (excl. Pre-Releases & Migrate old "_version.txt" [@MickLesk](https://github.com/MickLesk) ([#7328](https://github.com/community-scripts/ProxmoxVE/pull/7328))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Bump next from 15.2.4 to 15.5.2 in /frontend [@dependabot[bot]](https://github.com/dependabot[bot]) ([#7309](https://github.com/community-scripts/ProxmoxVE/pull/7309))
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- booklore: add note for start-up in frontend [@MickLesk](https://github.com/MickLesk) ([#7331](https://github.com/community-scripts/ProxmoxVE/pull/7331))
|
||||
|
||||
## 2025-08-31
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- n8n: Increase disk size [@tremor021](https://github.com/tremor021) ([#7320](https://github.com/community-scripts/ProxmoxVE/pull/7320))
|
||||
|
||||
## 2025-08-30
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -6,13 +6,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
# Source: https://actualbudget.org/
|
||||
|
||||
APP="Actual Budget"
|
||||
var_tags="finance"
|
||||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
var_tags="${var_tags:-finance}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@@ -27,6 +27,10 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if ! command -v memcached >/dev/null 2>&1; then
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y memcached libmemcached-tools
|
||||
fi
|
||||
if check_for_gh_release "adventurelog" "seanmorley15/adventurelog"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop adventurelog-backend
|
||||
@@ -35,6 +39,7 @@ function update_script() {
|
||||
|
||||
msg_info "Backup Old Installation"
|
||||
cp -r /opt/adventurelog /opt/adventurelog-backup
|
||||
rm -rf /opt/adventurelog
|
||||
msg_ok "Backup done"
|
||||
|
||||
fetch_and_deploy_gh_release "adventurelog" "seanmorley15/adventurelog"
|
||||
|
||||
@@ -9,7 +9,7 @@ APP="Apt-Cacher-NG"
|
||||
var_tags="${var_tags:-caching}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
@@ -20,18 +20,18 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
@@ -41,4 +41,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}:3142/acng-report.html${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3142/acng-report.html${CL}"
|
||||
|
||||
@@ -33,6 +33,10 @@ function update_script() {
|
||||
systemctl stop booklore
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "backup old install"
|
||||
mv /opt/booklore /opt/booklore_bak
|
||||
msg_ok "backup done"
|
||||
|
||||
fetch_and_deploy_gh_release "booklore" "booklore-app/BookLore"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
@@ -58,6 +62,7 @@ function update_script() {
|
||||
msg_info "Starting $APP"
|
||||
systemctl start booklore
|
||||
systemctl reload nginx
|
||||
rm -rf /opt/booklore_bak
|
||||
msg_ok "Started $APP"
|
||||
msg_ok "Updated Successfully"
|
||||
fi
|
||||
|
||||
@@ -37,7 +37,7 @@ function update_script() {
|
||||
mv /opt/configarr/{config.yml,secrets.yml,.env} "/opt/backup/"
|
||||
rm -rf /opt/configarr
|
||||
fetch_and_deploy_gh_release "configarr" "raydak-labs/configarr"
|
||||
mv /opt/backup/* /opt/configarr/
|
||||
mv /opt/backup/{config.yml,secrets.yml,.env} "/opt/configarr/"
|
||||
cd /opt/configarr
|
||||
$STD pnpm install
|
||||
$STD pnpm run build
|
||||
|
||||
@@ -9,7 +9,7 @@ APP="Element Synapse"
|
||||
var_tags="${var_tags:-server}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
6
ct/headers/leantime
Normal file
6
ct/headers/leantime
Normal file
@@ -0,0 +1,6 @@
|
||||
__ __ _
|
||||
/ / ___ ____ _____ / /_(_)___ ___ ___
|
||||
/ / / _ \/ __ `/ __ \/ __/ / __ `__ \/ _ \
|
||||
/ /___/ __/ /_/ / / / / /_/ / / / / / / __/
|
||||
/_____/\___/\__,_/_/ /_/\__/_/_/ /_/ /_/\___/
|
||||
|
||||
6
ct/headers/resiliosync
Normal file
6
ct/headers/resiliosync
Normal file
@@ -0,0 +1,6 @@
|
||||
____ _ ___ _____
|
||||
/ __ \___ _____(_) (_)___ / ___/__ ______ _____
|
||||
/ /_/ / _ \/ ___/ / / / __ \ \__ \/ / / / __ \/ ___/
|
||||
/ _, _/ __(__ ) / / / /_/ / ___/ / /_/ / / / / /__
|
||||
/_/ |_|\___/____/_/_/_/\____/ /____/\__, /_/ /_/\___/
|
||||
/____/
|
||||
17
ct/immich.sh
17
ct/immich.sh
@@ -61,7 +61,7 @@ function update_script() {
|
||||
done
|
||||
msg_ok "Image-processing libraries up to date"
|
||||
fi
|
||||
RELEASE="1.140.0"
|
||||
RELEASE="1.141.1"
|
||||
if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop immich-web
|
||||
@@ -206,7 +206,8 @@ function compile_libjxl() {
|
||||
SOURCE=${SOURCE_DIR}/libjxl
|
||||
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
|
||||
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
|
||||
: "${LIBJXL_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libjxl.json)}"
|
||||
# : "${LIBJXL_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libjxl.json)}"
|
||||
: "${LIBJXL_REVISION:=794a5dcf0d54f9f0b20d288a12e87afb91d20dfc}"
|
||||
if [[ "${update:-}" ]] || [[ "$LIBJXL_REVISION" != "$(grep 'libjxl' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
|
||||
msg_info "Recompiling libjxl"
|
||||
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
|
||||
@@ -253,7 +254,8 @@ function compile_libheif() {
|
||||
$STD apt-get install -y libaom-dev
|
||||
local update="required"
|
||||
fi
|
||||
: "${LIBHEIF_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libheif.json)}"
|
||||
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libheif.json)}"
|
||||
: "${LIBHEIF_REVISION:=35dad50a9145332a7bfdf1ff6aef6801fb613d68}"
|
||||
if [[ "${update:-}" ]] || [[ "$LIBHEIF_REVISION" != "$(grep 'libheif' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
|
||||
msg_info "Recompiling libheif"
|
||||
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
|
||||
@@ -285,7 +287,8 @@ function compile_libheif() {
|
||||
function compile_libraw() {
|
||||
SOURCE=${SOURCE_DIR}/libraw
|
||||
local update
|
||||
: "${LIBRAW_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libraw.json)}"
|
||||
# : "${LIBRAW_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libraw.json)}"
|
||||
: "${LIBRAW_REVISION:=09bea31181b43e97959ee5452d91e5bc66365f1f}"
|
||||
if [[ "${update:-}" ]] || [[ "$LIBRAW_REVISION" != "$(grep 'libraw' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
|
||||
msg_info "Recompiling libraw"
|
||||
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
|
||||
@@ -306,7 +309,8 @@ function compile_libraw() {
|
||||
|
||||
function compile_imagemagick() {
|
||||
SOURCE=$SOURCE_DIR/imagemagick
|
||||
: "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/imagemagick.json)}"
|
||||
# : "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/imagemagick.json)}"
|
||||
: "${IMAGEMAGICK_REVISION:=8289a3388a085ad5ae81aa6812f21554bdfd54f2}"
|
||||
if [[ "${update:-}" ]] || [[ "$IMAGEMAGICK_REVISION" != "$(grep 'imagemagick' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
|
||||
msg_info "Recompiling ImageMagick"
|
||||
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
|
||||
@@ -326,7 +330,8 @@ function compile_imagemagick() {
|
||||
|
||||
function compile_libvips() {
|
||||
SOURCE=$SOURCE_DIR/libvips
|
||||
: "${LIBVIPS_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libvips.json)}"
|
||||
# : "${LIBVIPS_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libvips.json)}"
|
||||
: "${LIBVIPS_REVISION:=8fa37a64547e392d3808eed8d72adab7e02b3d00}"
|
||||
if [[ "${update:-}" ]] || [[ "$LIBVIPS_REVISION" != "$(grep 'libvips' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
|
||||
msg_info "Recompiling libvips"
|
||||
if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
|
||||
|
||||
@@ -53,6 +53,11 @@ function update_script() {
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if grep -q '^ExecStart=/usr/bin/node\s\+dist/index\.mjs$' /etc/systemd/system/karakeep-workers.service; then
|
||||
sed -i -E 's#^(ExecStart=/usr/bin/node\s+dist/)index\.mjs$#\1index.js#' /etc/systemd/system/karakeep-workers.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep"
|
||||
if command -v corepack >/dev/null; then
|
||||
$STD corepack disable
|
||||
|
||||
62
ct/leantime.sh
Normal file
62
ct/leantime.sh
Normal file
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Stroopwafe1
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://leantime.io
|
||||
|
||||
APP="Leantime"
|
||||
var_tags="${var_tags:-productivity}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-20}"
|
||||
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/leantime ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "leantime" "Leantime/leantime"; then
|
||||
msg_info "Creating Backup"
|
||||
mariadb-dump leantime >"/opt/${APP}_db_backup_$(date +%F).sql"
|
||||
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" "/opt/${APP}"
|
||||
mv /opt/leantime /opt/leantime_bak
|
||||
msg_ok "Backup Created"
|
||||
|
||||
fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz
|
||||
|
||||
msg_info "Restoring Config & Permissions"
|
||||
mv /opt/leantime_bak/config/.env /opt/leantime/config/.env
|
||||
chown -R www-data:www-data "/opt/leantime"
|
||||
chmod -R 750 "/opt/leantime"
|
||||
msg_ok "Restored Config & Permissions"
|
||||
|
||||
msg_info "Removing Backup"
|
||||
rm -rf /opt/leantime_bak
|
||||
msg_ok "Removed Backup"
|
||||
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}/install${CL}"
|
||||
@@ -9,7 +9,7 @@ APP="n8n"
|
||||
var_tags="${var_tags:-automation}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
@@ -6,13 +6,13 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
|
||||
# Source: https://github.com/openziti/ziti
|
||||
|
||||
APP="openziti-controller"
|
||||
var_tags="network;openziti-controller"
|
||||
var_cpu="2"
|
||||
var_ram="1024"
|
||||
var_disk="8"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
var_tags="${var_tags:-network;openziti-controller}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
@@ -20,18 +20,18 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/openziti ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
exit
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/openziti ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
@@ -41,4 +41,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}https://${IP}:<port>/zac${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:<port>/zac${CL}"
|
||||
|
||||
25
ct/planka.sh
25
ct/planka.sh
@@ -34,12 +34,13 @@ function update_script() {
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Backing up data"
|
||||
mkdir -p /opt/planka-backup/{favicons,user-avatars,background-images,attachments}
|
||||
mv /opt/planka/.env /opt/planka-backup
|
||||
[ -d /opt/planka/public/favicons ] && find /opt/planka/public/favicons -maxdepth 1 -type f -exec mv -t /opt/planka-backup/favicons {} +
|
||||
[ -d /opt/planka/public/user-avatars ] && find /opt/planka/public/user-avatars -maxdepth 1 -type f -exec mv -t /opt/planka-backup/user-avatars {} +
|
||||
[ -d /opt/planka/public/background-images ] && find /opt/planka/public/background-images -maxdepth 1 -type f -exec mv -t /opt/planka-backup/background-images {} +
|
||||
[ -d /opt/planka/private/attachments ] && find /opt/planka/private/attachments -maxdepth 1 -type f -exec mv -t /opt/planka-backup/attachments {} +
|
||||
BK="/opt/planka-backup"
|
||||
mkdir -p "$BK"/{favicons,user-avatars,background-images,attachments}
|
||||
[ -f /opt/planka/.env ] && mv /opt/planka/.env "$BK"/
|
||||
[ -d /opt/planka/public/favicons ] && cp -a /opt/planka/public/favicons/. "$BK/favicons/"
|
||||
[ -d /opt/planka/public/user-avatars ] && cp -a /opt/planka/public/user-avatars/. "$BK/user-avatars/"
|
||||
[ -d /opt/planka/public/background-images ] && cp -a /opt/planka/public/background-images/. "$BK/background-images/"
|
||||
[ -d /opt/planka/private/attachments ] && cp -a /opt/planka/private/attachments/. "$BK/attachments/"
|
||||
rm -rf /opt/planka
|
||||
msg_ok "Backed up data"
|
||||
|
||||
@@ -51,11 +52,13 @@ function update_script() {
|
||||
msg_ok "Updated Frontend"
|
||||
|
||||
msg_info "Restoring data"
|
||||
mv /opt/planka-backup/.env /opt/planka/
|
||||
[ -d /opt/planka-backup/favicons ] && find /opt/planka-backup/favicons -maxdepth 1 -type f -exec mv -t /opt/planka/public/favicons {} +
|
||||
[ -d /opt/planka-backup/user-avatars ] && find /opt/planka-backup/user-avatars -maxdepth 1 -type f -exec mv -t /opt/planka/public/user-avatars {} +
|
||||
[ -d /opt/planka-backup/background-images ] && find /opt/planka-backup/background-images -maxdepth 1 -type f -exec mv -t /opt/planka/public/background-images {} +
|
||||
[ -d /opt/planka-backup/attachments ] && find /opt/planka-backup/attachments -maxdepth 1 -type f -exec mv -t /opt/planka/private/attachments {} +
|
||||
[ -f "$BK/.env" ] && mv "$BK/.env" /opt/planka/.env
|
||||
mkdir -p /opt/planka/public/{favicons,user-avatars,background-images} /opt/planka/private/attachments
|
||||
[ -d "$BK/favicons" ] && cp -a "$BK/favicons/." /opt/planka/public/favicons/
|
||||
[ -d "$BK/user-avatars" ] && cp -a "$BK/user-avatars/." /opt/planka/public/user-avatars/
|
||||
[ -d "$BK/background-images" ] && cp -a "$BK/background-images/." /opt/planka/public/background-images/
|
||||
[ -d "$BK/attachments" ] && cp -a "$BK/attachments/." /opt/planka/private/attachments/
|
||||
rm -rf "$BK"
|
||||
msg_ok "Restored data"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
|
||||
13
ct/pulse.sh
13
ct/pulse.sh
@@ -28,10 +28,6 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -f ~/.pulse ]]; then
|
||||
msg_error "Old Installation Found! Please recreate the container due big changes in the software."
|
||||
exit 1
|
||||
fi
|
||||
if check_for_gh_release "pulse" "rcourtman/Pulse"; then
|
||||
SERVICE_PATH="/etc/systemd/system"
|
||||
msg_info "Stopping Services"
|
||||
@@ -43,19 +39,20 @@ function update_script() {
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
|
||||
ln -sf /opt/pulse/bin/pulse /usr/local/bin/pulse
|
||||
chown -R pulse:pulse /etc/pulse /opt/pulse
|
||||
if [[ -f "$SERVICE_PATH"/pulse.service ]]; then
|
||||
mv "$SERVICE_PATH"/pulse.service "$SERVICE_PATH"/pulse-backend.service
|
||||
if [[ -f "$SERVICE_PATH"/pulse-backend.service ]]; then
|
||||
mv "$SERVICE_PATH"/pulse-backend.service "$SERVICE_PATH"/pulse.service
|
||||
fi
|
||||
sed -i -e 's|pulse/pulse|pulse/bin/pulse|' \
|
||||
-e 's/^Environment="API.*$//' "$SERVICE_PATH"/pulse-backend.service
|
||||
-e 's/^Environment="API.*$//' "$SERVICE_PATH"/pulse.service
|
||||
systemctl daemon-reload
|
||||
if grep -q 'pulse-home:/bin/bash' /etc/passwd; then
|
||||
usermod -s /usr/sbin/nologin pulse
|
||||
fi
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start pulse-backend
|
||||
systemctl start pulse
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated Successfully"
|
||||
fi
|
||||
|
||||
@@ -34,6 +34,7 @@ function update_script() {
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
fetch_and_deploy_gh_release "recyclarr" "recyclarr/recyclarr" "prebuild" "latest" "/usr/local/bin" "recyclarr-linux-x64.tar.xz"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start recyclarr
|
||||
msg_ok "Started Service"
|
||||
|
||||
44
ct/resiliosync.sh
Normal file
44
ct/resiliosync.sh
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/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: David Bennett (dbinit)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.resilio.com/sync
|
||||
|
||||
APP="Resilio Sync"
|
||||
var_tags="${var_tags:-sync}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
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 /var/lib/resilio-sync ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating ${APP} LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated Successfully"
|
||||
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}https://${IP}:8888${CL}"
|
||||
@@ -27,6 +27,9 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if ! grep -q "client_max_body_size[[:space:]]\+100M;" /etc/nginx/conf.d/snipeit.conf; then
|
||||
sed -i '/index index.php;/i \ client_max_body_size 100M;' /etc/nginx/conf.d/snipeit.conf
|
||||
fi
|
||||
|
||||
if check_for_gh_release "snipe-it" "snipe/snipe-it"; then
|
||||
msg_info "Stopping Services"
|
||||
|
||||
11
ct/tududi.sh
11
ct/tududi.sh
@@ -27,17 +27,22 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
if check_for_gh_release "tududi" "chrisvel/tududi"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop tududi
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Remove and backup Files"
|
||||
DB="$(sed -n '/^DB_FILE/s/[^=]*=//p' /opt/tududi/backend/.env)"
|
||||
export DB_FILE="$DB"
|
||||
cp /opt/tududi/backend/.env /opt/tududi.env
|
||||
rm -rf /opt/tududi/backend/dist
|
||||
msg_ok "Backup and removed Files"
|
||||
|
||||
fetch_and_deploy_gh_release "tududi" "chrisvel/tududi"
|
||||
fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" "tarball" "latest" "/opt/tududi"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
cd /opt/tududi
|
||||
@@ -48,6 +53,10 @@ function update_script() {
|
||||
mv ./public/locales ./backend/dist
|
||||
mv ./public/favicon.* ./backend/dist
|
||||
mv /opt/tududi.env /opt/tududi/.env
|
||||
sed -i -e 's|/tududi$|/tududi/backend|' \
|
||||
-e 's|npm run start|bash /opt/tududi/backend/cmd/start.sh|' \
|
||||
/etc/systemd/system/tududi.service
|
||||
systemctl daemon-reload
|
||||
msg_ok "Updated $APP"
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
@@ -6,13 +6,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
# Source: https://github.com/PCJones/UmlautAdaptarr
|
||||
|
||||
APP="UmlautAdaptarr"
|
||||
var_tags="arr"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
var_tags="${var_tags:-arr}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
@@ -20,33 +20,33 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/UmlautAdaptarr ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||
if [[ ! -f /opt/UmlautAdaptarr_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/UmlautAdaptarr_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop umlautadaptarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file
|
||||
$STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start umlautadaptarr
|
||||
msg_ok "Started Service"
|
||||
msg_ok "$APP has been updated to ${RELEASE}."
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/UmlautAdaptarr ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||
if [[ ! -f /opt/UmlautAdaptarr_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/UmlautAdaptarr_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop umlautadaptarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file
|
||||
$STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start umlautadaptarr
|
||||
msg_ok "Started Service"
|
||||
msg_ok "$APP has been updated to ${RELEASE}."
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
start
|
||||
build_container
|
||||
|
||||
@@ -28,6 +28,12 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if ! dpkg -s git >/dev/null 2>&1; then
|
||||
msg_info "Installing git"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y git
|
||||
msg_ok "Installed git"
|
||||
fi
|
||||
apt-get update
|
||||
apt-get -y upgrade
|
||||
if [[ -d /etc/wgdashboard ]]; then
|
||||
|
||||
@@ -45,13 +45,14 @@ function update_script() {
|
||||
|
||||
msg_info "Updating $APP"
|
||||
cd /opt/wizarr
|
||||
/usr/local/bin/uv -q sync --locked
|
||||
$STD /usr/local/bin/uv -q run pybabel compile -d app/translations
|
||||
$STD /usr/local/bin/uv lock
|
||||
$STD /usr/local/bin/uv sync --locked
|
||||
$STD /usr/local/bin/uv run pybabel compile -d app/translations
|
||||
$STD npm --prefix app/static install
|
||||
$STD npm --prefix app/static run build:css
|
||||
mkdir -p ./.cache
|
||||
$STD tar -xf "$BACKUP_FILE" --directory=/
|
||||
$STD /usr/local/bin/uv -q run flask db upgrade
|
||||
$STD /usr/local/bin/uv run flask db upgrade
|
||||
msg_ok "Updated $APP"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
@@ -61,7 +62,7 @@ function update_script() {
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf "$BACKUP_FILE"
|
||||
msg_ok "Cleanup Completed"
|
||||
msg_ok "Update Successfully"
|
||||
msg_ok "Updated Successfully"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
3
frontend/components.json
generated
3
frontend/components.json
generated
@@ -13,5 +13,8 @@
|
||||
"aliases": {
|
||||
"components": "@/components",
|
||||
"utils": "@/lib/utils"
|
||||
},
|
||||
"registries": {
|
||||
"@animate-ui": "https://animate-ui.com/r/{name}.json"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,10 @@ const nextConfig = {
|
||||
BASE_PATH: "ProxmoxVE",
|
||||
},
|
||||
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
|
||||
output: "export",
|
||||
basePath: `/ProxmoxVE`,
|
||||
};
|
||||
|
||||
712
frontend/package-lock.json
generated
712
frontend/package-lock.json
generated
@@ -31,9 +31,10 @@
|
||||
"date-fns": "^4.1.0",
|
||||
"framer-motion": "^11.18.2",
|
||||
"fuse.js": "^7.1.0",
|
||||
"lucide-react": "^0.453.0",
|
||||
"lucide-react": "^0.542.0",
|
||||
"mini-svg-data-uri": "^1.4.4",
|
||||
"next": "15.2.4",
|
||||
"motion": "^12.23.12",
|
||||
"next": "15.5.2",
|
||||
"next-themes": "^0.4.4",
|
||||
"nuqs": "^2.4.1",
|
||||
"pocketbase": "^0.21.5",
|
||||
@@ -46,6 +47,7 @@
|
||||
"react-dom": "19.0.0",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-simple-typewriter": "^5.0.1",
|
||||
"react-use-measure": "^2.1.7",
|
||||
"sharp": "^0.33.5",
|
||||
"simple-icons": "^13.21.0",
|
||||
"sonner": "^1.7.4",
|
||||
@@ -742,9 +744,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz",
|
||||
"integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==",
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz",
|
||||
"integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
@@ -1900,6 +1902,22 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linux-ppc64": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.0.tgz",
|
||||
"integrity": "sha512-Xod/7KaDDHkYu2phxxfeEPXfVXFKx70EAFZ0qyUdOjCcxbjqyJOEUpDe6RIyaunGxT34Anf9ue/wuWOqBW2WcQ==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linux-s390x": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz",
|
||||
@@ -2008,6 +2026,28 @@
|
||||
"@img/sharp-libvips-linux-arm64": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linux-ppc64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.3.tgz",
|
||||
"integrity": "sha512-GLtbLQMCNC5nxuImPR2+RgrviwKwVql28FWZIW1zWruy6zLgA5/x2ZXk3mxj58X/tszVF69KK0Is83V8YgWhLA==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-ppc64": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linux-s390x": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz",
|
||||
@@ -2115,6 +2155,25 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-win32-arm64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.3.tgz",
|
||||
"integrity": "sha512-MjnHPnbqMXNC2UgeLJtX4XqoVHHlZNd+nPt1kRPmj63wURegwBhZlApELdtxM2OIZDRv/DFtLcNhVbd1z8GYXQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-win32-ia32": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz",
|
||||
@@ -2244,9 +2303,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-15.2.4.tgz",
|
||||
"integrity": "sha512-+SFtMgoiYP3WoSswuNmxJOCwi06TdWE733D+WPjpXIe4LXGULwEaofiiAy6kbS0+XjM5xF5n3lKuBwN2SnqD9g==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.2.tgz",
|
||||
"integrity": "sha512-Qe06ew4zt12LeO6N7j8/nULSOe3fMXE4dM6xgpBQNvdzyK1sv5y4oAP3bq4LamrvGCZtmRYnW8URFCeX5nFgGg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
@@ -2260,9 +2319,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.4.tgz",
|
||||
"integrity": "sha512-1AnMfs655ipJEDC/FHkSr0r3lXBgpqKo4K1kiwfUf3iE68rDFXZ1TtHdMvf7D0hMItgDZ7Vuq3JgNMbt/+3bYw==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.2.tgz",
|
||||
"integrity": "sha512-8bGt577BXGSd4iqFygmzIfTYizHb0LGWqH+qgIF/2EDxS5JsSdERJKA8WgwDyNBZgTIIA4D8qUtoQHmxIIquoQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2276,9 +2335,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.4.tgz",
|
||||
"integrity": "sha512-3qK2zb5EwCwxnO2HeO+TRqCubeI/NgCe+kL5dTJlPldV/uwCnUgC7VbEzgmxbfrkbjehL4H9BPztWOEtsoMwew==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.2.tgz",
|
||||
"integrity": "sha512-2DjnmR6JHK4X+dgTXt5/sOCu/7yPtqpYt8s8hLkHFK3MGkka2snTv3yRMdHvuRtJVkPwCGsvBSwmoQCHatauFQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2292,9 +2351,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.2.4.tgz",
|
||||
"integrity": "sha512-HFN6GKUcrTWvem8AZN7tT95zPb0GUGv9v0d0iyuTb303vbXkkbHDp/DxufB04jNVD+IN9yHy7y/6Mqq0h0YVaQ==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.2.tgz",
|
||||
"integrity": "sha512-3j7SWDBS2Wov/L9q0mFJtEvQ5miIqfO4l7d2m9Mo06ddsgUK8gWfHGgbjdFlCp2Ek7MmMQZSxpGFqcC8zGh2AA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2308,9 +2367,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.2.4.tgz",
|
||||
"integrity": "sha512-Oioa0SORWLwi35/kVB8aCk5Uq+5/ZIumMK1kJV+jSdazFm2NzPDztsefzdmzzpx5oGCJ6FkUC7vkaUseNTStNA==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.2.tgz",
|
||||
"integrity": "sha512-s6N8k8dF9YGc5T01UPQ08yxsK6fUow5gG1/axWc1HVVBYQBgOjca4oUZF7s4p+kwhkB1bDSGR8QznWrFZ/Rt5g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2324,9 +2383,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.2.4.tgz",
|
||||
"integrity": "sha512-yb5WTRaHdkgOqFOZiu6rHV1fAEK0flVpaIN2HB6kxHVSy/dIajWbThS7qON3W9/SNOH2JWkVCyulgGYekMePuw==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.2.tgz",
|
||||
"integrity": "sha512-o1RV/KOODQh6dM6ZRJGZbc+MOAHww33Vbs5JC9Mp1gDk8cpEO+cYC/l7rweiEalkSm5/1WGa4zY7xrNwObN4+Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2340,9 +2399,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.2.4.tgz",
|
||||
"integrity": "sha512-Dcdv/ix6srhkM25fgXiyOieFUkz+fOYkHlydWCtB0xMST6X9XYI3yPDKBZt1xuhOytONsIFJFB08xXYsxUwJLw==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.2.tgz",
|
||||
"integrity": "sha512-/VUnh7w8RElYZ0IV83nUcP/J4KJ6LLYliiBIri3p3aW2giF+PAVgZb6mk8jbQSB3WlTai8gEmCAr7kptFa1H6g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2356,9 +2415,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.2.4.tgz",
|
||||
"integrity": "sha512-dW0i7eukvDxtIhCYkMrZNQfNicPDExt2jPb9AZPpL7cfyUo7QSNl1DjsHjmmKp6qNAqUESyT8YFl/Aw91cNJJg==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.2.tgz",
|
||||
"integrity": "sha512-sMPyTvRcNKXseNQ/7qRfVRLa0VhR0esmQ29DD6pqvG71+JdVnESJaHPA8t7bc67KD5spP3+DOCNLhqlEI2ZgQg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2372,9 +2431,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.2.4.tgz",
|
||||
"integrity": "sha512-SbnWkJmkS7Xl3kre8SdMF6F/XDh1DTFEhp0jRTj/uB8iPKoU2bb2NDfcu+iifv1+mxQEd1g2vvSxcZbXSKyWiQ==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.2.tgz",
|
||||
"integrity": "sha512-W5VvyZHnxG/2ukhZF/9Ikdra5fdNftxI6ybeVKYvBPDtyx7x4jPPSNduUkfH5fo3zG0JQ0bPxgy41af2JX5D4Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3739,12 +3798,6 @@
|
||||
"eslint": ">=9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@swc/counter": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
|
||||
"integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/@swc/helpers": {
|
||||
"version": "0.5.15",
|
||||
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz",
|
||||
@@ -5091,17 +5144,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/busboy": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
|
||||
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
|
||||
"dependencies": {
|
||||
"streamsearch": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/cac": {
|
||||
"version": "6.7.14",
|
||||
"resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
|
||||
@@ -7624,11 +7666,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/fdir": {
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
@@ -9253,12 +9298,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lucide-react": {
|
||||
"version": "0.453.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.453.0.tgz",
|
||||
"integrity": "sha512-kL+RGZCcJi9BvJtzg2kshO192Ddy9hv3ij+cPrVPWSRzgCWCVazoQJxOjAwgK53NomL07HB7GPHW120FimjNhQ==",
|
||||
"version": "0.542.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.542.0.tgz",
|
||||
"integrity": "sha512-w3hD8/SQB7+lzU2r4VdFyzzOzKnUjTZIF/MQJGSSvni7Llewni4vuViRppfRAa2guOsY5k4jZyxw/i9DQHv+dw==",
|
||||
"license": "ISC",
|
||||
"peerDependencies": {
|
||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc"
|
||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
@@ -10299,6 +10344,32 @@
|
||||
"pathe": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/motion": {
|
||||
"version": "12.23.12",
|
||||
"resolved": "https://registry.npmjs.org/motion/-/motion-12.23.12.tgz",
|
||||
"integrity": "sha512-8jCD8uW5GD1csOoqh1WhH1A6j5APHVE15nuBkFeRiMzYBdRwyAHmSP/oXSuW0WJPZRXTFdBoG4hY9TFWNhhwng==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"framer-motion": "^12.23.12",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion/is-prop-valid": "*",
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@emotion/is-prop-valid": {
|
||||
"optional": true
|
||||
},
|
||||
"react": {
|
||||
"optional": true
|
||||
},
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/motion-dom": {
|
||||
"version": "11.18.1",
|
||||
"resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-11.18.1.tgz",
|
||||
@@ -10314,6 +10385,48 @@
|
||||
"integrity": "sha512-49Kt+HKjtbJKLtgO/LKj9Ld+6vw9BjH5d9sc40R/kVyH8GLAXgT42M2NnuPcJNuA3s9ZfZBUcwIgpmZWGEE+hA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/motion/node_modules/framer-motion": {
|
||||
"version": "12.23.12",
|
||||
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.12.tgz",
|
||||
"integrity": "sha512-6e78rdVtnBvlEVgu6eFEAgG9v3wLnYEboM8I5O5EXvfKC8gxGQB8wXJdhkMy10iVcn05jl6CNw7/HTsTCfwcWg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"motion-dom": "^12.23.12",
|
||||
"motion-utils": "^12.23.6",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion/is-prop-valid": "*",
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@emotion/is-prop-valid": {
|
||||
"optional": true
|
||||
},
|
||||
"react": {
|
||||
"optional": true
|
||||
},
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/motion/node_modules/motion-dom": {
|
||||
"version": "12.23.12",
|
||||
"resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.23.12.tgz",
|
||||
"integrity": "sha512-RcR4fvMCTESQBD/uKQe49D5RUeDOokkGRmz4ceaJKDBgHYtZtntC/s2vLvY38gqGaytinij/yi3hMcWVcEF5Kw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"motion-utils": "^12.23.6"
|
||||
}
|
||||
},
|
||||
"node_modules/motion/node_modules/motion-utils": {
|
||||
"version": "12.23.6",
|
||||
"resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.23.6.tgz",
|
||||
"integrity": "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
@@ -10385,15 +10498,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "15.2.4",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-15.2.4.tgz",
|
||||
"integrity": "sha512-VwL+LAaPSxEkd3lU2xWbgEOtrM8oedmyhBqaVNmgKB+GvZlCy9rgaEc+y2on0wv+l0oSFqLtYD6dcC1eAedUaQ==",
|
||||
"version": "15.5.2",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-15.5.2.tgz",
|
||||
"integrity": "sha512-H8Otr7abj1glFhbGnvUt3gz++0AF1+QoCXEBmd/6aKbfdFwrn0LpA836Ed5+00va/7HQSDD+mOoVhn3tNy3e/Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@next/env": "15.2.4",
|
||||
"@swc/counter": "0.1.3",
|
||||
"@next/env": "15.5.2",
|
||||
"@swc/helpers": "0.5.15",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001579",
|
||||
"postcss": "8.4.31",
|
||||
"styled-jsx": "5.1.6"
|
||||
@@ -10405,19 +10516,19 @@
|
||||
"node": "^18.18.0 || ^19.8.0 || >= 20.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "15.2.4",
|
||||
"@next/swc-darwin-x64": "15.2.4",
|
||||
"@next/swc-linux-arm64-gnu": "15.2.4",
|
||||
"@next/swc-linux-arm64-musl": "15.2.4",
|
||||
"@next/swc-linux-x64-gnu": "15.2.4",
|
||||
"@next/swc-linux-x64-musl": "15.2.4",
|
||||
"@next/swc-win32-arm64-msvc": "15.2.4",
|
||||
"@next/swc-win32-x64-msvc": "15.2.4",
|
||||
"sharp": "^0.33.5"
|
||||
"@next/swc-darwin-arm64": "15.5.2",
|
||||
"@next/swc-darwin-x64": "15.5.2",
|
||||
"@next/swc-linux-arm64-gnu": "15.5.2",
|
||||
"@next/swc-linux-arm64-musl": "15.5.2",
|
||||
"@next/swc-linux-x64-gnu": "15.5.2",
|
||||
"@next/swc-linux-x64-musl": "15.5.2",
|
||||
"@next/swc-win32-arm64-msvc": "15.5.2",
|
||||
"@next/swc-win32-x64-msvc": "15.5.2",
|
||||
"sharp": "^0.34.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
"@playwright/test": "^1.41.2",
|
||||
"@playwright/test": "^1.51.1",
|
||||
"babel-plugin-react-compiler": "*",
|
||||
"react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",
|
||||
"react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",
|
||||
@@ -10448,6 +10559,367 @@
|
||||
"react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-darwin-arm64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.3.tgz",
|
||||
"integrity": "sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-darwin-arm64": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-darwin-x64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.3.tgz",
|
||||
"integrity": "sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-darwin-x64": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-darwin-arm64": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.0.tgz",
|
||||
"integrity": "sha512-sBZmpwmxqwlqG9ueWFXtockhsxefaV6O84BMOrhtg/YqbTaRdqDE7hxraVE3y6gVM4eExmfzW4a8el9ArLeEiQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-darwin-x64": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.0.tgz",
|
||||
"integrity": "sha512-M64XVuL94OgiNHa5/m2YvEQI5q2cl9d/wk0qFTDVXcYzi43lxuiFTftMR1tOnFQovVXNZJ5TURSDK2pNe9Yzqg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-linux-arm": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.0.tgz",
|
||||
"integrity": "sha512-mWd2uWvDtL/nvIzThLq3fr2nnGfyr/XMXlq8ZJ9WMR6PXijHlC3ksp0IpuhK6bougvQrchUAfzRLnbsen0Cqvw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-linux-arm64": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.0.tgz",
|
||||
"integrity": "sha512-RXwd0CgG+uPRX5YYrkzKyalt2OJYRiJQ8ED/fi1tq9WQW2jsQIn0tqrlR5l5dr/rjqq6AHAxURhj2DVjyQWSOA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-linux-s390x": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.0.tgz",
|
||||
"integrity": "sha512-eMKfzDxLGT8mnmPJTNMcjfO33fLiTDsrMlUVcp6b96ETbnJmd4uvZxVJSKPQfS+odwfVaGifhsB07J1LynFehw==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-linux-x64": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.0.tgz",
|
||||
"integrity": "sha512-ZW3FPWIc7K1sH9E3nxIGB3y3dZkpJlMnkk7z5tu1nSkBoCgw2nSRTFHI5pB/3CQaJM0pdzMF3paf9ckKMSE9Tg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-linuxmusl-arm64": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.0.tgz",
|
||||
"integrity": "sha512-UG+LqQJbf5VJ8NWJ5Z3tdIe/HXjuIdo4JeVNADXBFuG7z9zjoegpzzGIyV5zQKi4zaJjnAd2+g2nna8TZvuW9Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-libvips-linuxmusl-x64": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.0.tgz",
|
||||
"integrity": "sha512-SRYOLR7CXPgNze8akZwjoGBoN1ThNZoqpOgfnOxmWsklTGVfJiGJoC/Lod7aNMGA1jSsKWM1+HRX43OP6p9+6Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-linux-arm": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.3.tgz",
|
||||
"integrity": "sha512-oBK9l+h6KBN0i3dC8rYntLiVfW8D8wH+NPNT3O/WBHeW0OQWCjfWksLUaPidsrDKpJgXp3G3/hkmhptAW0I3+A==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-arm": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-linux-arm64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.3.tgz",
|
||||
"integrity": "sha512-QdrKe3EvQrqwkDrtuTIjI0bu6YEJHTgEeqdzI3uWJOH6G1O8Nl1iEeVYRGdj1h5I21CqxSvQp1Yv7xeU3ZewbA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-arm64": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-linux-s390x": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.3.tgz",
|
||||
"integrity": "sha512-3gahT+A6c4cdc2edhsLHmIOXMb17ltffJlxR0aC2VPZfwKoTGZec6u5GrFgdR7ciJSsHT27BD3TIuGcuRT0KmQ==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-s390x": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-linux-x64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.3.tgz",
|
||||
"integrity": "sha512-8kYso8d806ypnSq3/Ly0QEw90V5ZoHh10yH0HnrzOCr6DKAPI6QVHvwleqMkVQ0m+fc7EH8ah0BB0QPuWY6zJQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-x64": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-linuxmusl-arm64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.3.tgz",
|
||||
"integrity": "sha512-vAjbHDlr4izEiXM1OTggpCcPg9tn4YriK5vAjowJsHwdBIdx0fYRsURkxLG2RLm9gyBq66gwtWI8Gx0/ov+JKQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-linuxmusl-x64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.3.tgz",
|
||||
"integrity": "sha512-gCWUn9547K5bwvOn9l5XGAEjVTTRji4aPTqLzGXHvIr6bIDZKNTA34seMPgM0WmSf+RYBH411VavCejp3PkOeQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-wasm32": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.3.tgz",
|
||||
"integrity": "sha512-+CyRcpagHMGteySaWos8IbnXcHgfDn7pO2fiC2slJxvNq9gDipYBN42/RagzctVRKgxATmfqOSulgZv5e1RdMg==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/runtime": "^1.4.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-win32-ia32": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.3.tgz",
|
||||
"integrity": "sha512-xuCdhH44WxuXgOM714hn4amodJMZl3OEvf0GVTm0BEyMeA2to+8HEdRPShH0SLYptJY1uBw+SCFP9WVQi1Q/cw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/@img/sharp-win32-x64": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.3.tgz",
|
||||
"integrity": "sha512-OWwz05d++TxzLEv4VnsTz5CmZ6mI6S05sfQGEMrNrQcOEERbX46332IvE7pO/EUiw7jUrrS40z/M7kPyjfl04g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/postcss": {
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
@@ -10476,6 +10948,49 @@
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/next/node_modules/sharp": {
|
||||
"version": "0.34.3",
|
||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.3.tgz",
|
||||
"integrity": "sha512-eX2IQ6nFohW4DbvHIOLRB3MHFpYqaqvXd3Tp5e/T/dSH83fxaNJQRvDMhASmkNTsNTVF2/OOopzRCt7xokgPfg==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"color": "^4.2.3",
|
||||
"detect-libc": "^2.0.4",
|
||||
"semver": "^7.7.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-darwin-arm64": "0.34.3",
|
||||
"@img/sharp-darwin-x64": "0.34.3",
|
||||
"@img/sharp-libvips-darwin-arm64": "1.2.0",
|
||||
"@img/sharp-libvips-darwin-x64": "1.2.0",
|
||||
"@img/sharp-libvips-linux-arm": "1.2.0",
|
||||
"@img/sharp-libvips-linux-arm64": "1.2.0",
|
||||
"@img/sharp-libvips-linux-ppc64": "1.2.0",
|
||||
"@img/sharp-libvips-linux-s390x": "1.2.0",
|
||||
"@img/sharp-libvips-linux-x64": "1.2.0",
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.2.0",
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.0",
|
||||
"@img/sharp-linux-arm": "0.34.3",
|
||||
"@img/sharp-linux-arm64": "0.34.3",
|
||||
"@img/sharp-linux-ppc64": "0.34.3",
|
||||
"@img/sharp-linux-s390x": "0.34.3",
|
||||
"@img/sharp-linux-x64": "0.34.3",
|
||||
"@img/sharp-linuxmusl-arm64": "0.34.3",
|
||||
"@img/sharp-linuxmusl-x64": "0.34.3",
|
||||
"@img/sharp-wasm32": "0.34.3",
|
||||
"@img/sharp-win32-arm64": "0.34.3",
|
||||
"@img/sharp-win32-ia32": "0.34.3",
|
||||
"@img/sharp-win32-x64": "0.34.3"
|
||||
}
|
||||
},
|
||||
"node_modules/node-releases": {
|
||||
"version": "2.0.19",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
|
||||
@@ -10920,9 +11435,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
|
||||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -11548,6 +12063,21 @@
|
||||
"react": ">= 0.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-use-measure": {
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.7.tgz",
|
||||
"integrity": "sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"react": ">=16.13",
|
||||
"react-dom": ">=16.13"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/read-cache": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
||||
@@ -12257,14 +12787,6 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/streamsearch": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
||||
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/string-ts": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/string-ts/-/string-ts-2.2.1.tgz",
|
||||
@@ -12873,14 +13395,14 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tinyglobby": {
|
||||
"version": "0.2.14",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
|
||||
"integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
|
||||
"version": "0.2.15",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
|
||||
"integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fdir": "^6.4.4",
|
||||
"picomatch": "^4.0.2"
|
||||
"fdir": "^6.5.0",
|
||||
"picomatch": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
@@ -13403,19 +13925,19 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.0.0.tgz",
|
||||
"integrity": "sha512-ixXJB1YRgDIw2OszKQS9WxGHKwLdCsbQNkpJN171udl6szi/rIySHL6/Os3s2+oE4P/FLD4dxg4mD7Wust+u5g==",
|
||||
"version": "7.1.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
|
||||
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.6",
|
||||
"picomatch": "^4.0.2",
|
||||
"fdir": "^6.5.0",
|
||||
"picomatch": "^4.0.3",
|
||||
"postcss": "^8.5.6",
|
||||
"rollup": "^4.40.0",
|
||||
"tinyglobby": "^0.2.14"
|
||||
"rollup": "^4.43.0",
|
||||
"tinyglobby": "^0.2.15"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
|
||||
6
frontend/package.json
generated
6
frontend/package.json
generated
@@ -38,9 +38,10 @@
|
||||
"date-fns": "^4.1.0",
|
||||
"framer-motion": "^11.18.2",
|
||||
"fuse.js": "^7.1.0",
|
||||
"lucide-react": "^0.453.0",
|
||||
"lucide-react": "^0.542.0",
|
||||
"mini-svg-data-uri": "^1.4.4",
|
||||
"next": "15.2.4",
|
||||
"motion": "^12.23.12",
|
||||
"next": "15.5.2",
|
||||
"next-themes": "^0.4.4",
|
||||
"nuqs": "^2.4.1",
|
||||
"pocketbase": "^0.21.5",
|
||||
@@ -53,6 +54,7 @@
|
||||
"react-dom": "19.0.0",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-simple-typewriter": "^5.0.1",
|
||||
"react-use-measure": "^2.1.7",
|
||||
"sharp": "^0.33.5",
|
||||
"simple-icons": "^13.21.0",
|
||||
"sonner": "^1.7.4",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 2,
|
||||
"hdd": 10,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
|
||||
@@ -31,5 +31,10 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
"notes": [
|
||||
{
|
||||
"text": "Starting Booklore (Web UI) may take up to 2 minutes after a restart or fresh installation.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 2048,
|
||||
"hdd": 4,
|
||||
"hdd": 8,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Please be aware that Immich releases are pinned to specific versions until compatibility has been confirmed by the Community Scripts maintainers; as a result, the version installed by the helper script may not be the most current version of Immich",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "During installation, you will be prompted with the option to install Intel OpenVINO for hardware-accelerated machine-learning. If you opt in, increase your LXC RAM after installation, as OpenVINO is memory-intensive",
|
||||
"type": "info"
|
||||
|
||||
35
frontend/public/json/leantime.json
Normal file
35
frontend/public/json/leantime.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Leantime",
|
||||
"slug": "leantime",
|
||||
"categories": [
|
||||
12
|
||||
],
|
||||
"date_created": "2025-09-06",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://docs.leantime.io/",
|
||||
"config_path": "/opt/Leantime/config/.env",
|
||||
"website": "https://leantime.io",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/leantime.webp",
|
||||
"description": "Leantime is a goals focused project management system for non-project managers. Building with ADHD, Autism, and dyslexia in mind. ",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/leantime.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 20,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
"privileged": false,
|
||||
"interface_port": 8000,
|
||||
"documentation": "https://maxdorninger.github.io/MediaManager/introduction.html",
|
||||
"config_path": "/opt/mm_data/config.toml",
|
||||
"config_path": "/opt/mm/config/config.toml",
|
||||
"website": "https://github.com/maxdorninger/MediaManager",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/mediamanager.webp",
|
||||
"description": "A modern selfhosted media management system for your media library",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 6,
|
||||
"hdd": 10,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
{
|
||||
"name": "Paperless-ngx",
|
||||
"slug": "paperless-ngx",
|
||||
"categories": [
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8000,
|
||||
"documentation": "https://docs.paperless-ngx.com/",
|
||||
"website": "https://docs.paperless-ngx.com/",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/paperless-ngx.webp",
|
||||
"config_path": "/opt/paperless/paperless.conf",
|
||||
"description": "Paperless-ngx is a software tool designed for digitizing and organizing paper documents. It provides a web-based interface for scanning, uploading, and organizing paper documents, making it easier to manage, search, and access important information. Paperless-ngx uses the OCR (Optical Character Recognition) technology to extract text from scanned images and makes it searchable, thus increasing the efficiency of document management.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/paperless-ngx.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 12,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin",
|
||||
"password": null
|
||||
"name": "Paperless-ngx",
|
||||
"slug": "paperless-ngx",
|
||||
"categories": [
|
||||
12
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8000,
|
||||
"documentation": "https://docs.paperless-ngx.com/",
|
||||
"website": "https://docs.paperless-ngx.com/",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/paperless-ngx.webp",
|
||||
"config_path": "/opt/paperless/paperless.conf",
|
||||
"description": "Paperless-ngx is a software tool designed for digitizing and organizing paper documents. It provides a web-based interface for scanning, uploading, and organizing paper documents, making it easier to manage, search, and access important information. Paperless-ngx uses the OCR (Optical Character Recognition) technology to extract text from scanned images and makes it searchable, thus increasing the efficiency of document management.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/paperless-ngx.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 12,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Show Login Credentials, type `cat ~/paperless-ngx.creds` in the LXC console",
|
||||
"type": "info"
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Show Login Credentials, type `cat ~/paperless-ngx.creds` in the LXC console",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Script installs English as default OCR language. To install additional languages, use `apt-get install tesseract-ocr-[lang]`, where [lang] is the language code (e.g. `apt-get install tesseract-ocr-deu`).",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
{
|
||||
"text": "Script installs English as default OCR language. To install additional languages, use `apt-get install tesseract-ocr-[lang]`, where [lang] is the language code (e.g. `apt-get install tesseract-ocr-deu`).",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"type": "warning"
|
||||
},
|
||||
{
|
||||
"text": "Advanced Install is only possible without root password and root SSH access, you can configure this after installation.",
|
||||
"text": "Advanced Install is only possible with disabled IPV6! Otherwise the installation sometimes stuck.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
|
||||
40
frontend/public/json/resiliosync.json
Normal file
40
frontend/public/json/resiliosync.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "Resilio Sync",
|
||||
"slug": "resiliosync",
|
||||
"categories": [
|
||||
11
|
||||
],
|
||||
"date_created": "2025-09-06",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"config_path": "/etc/resilio-sync/config.json",
|
||||
"interface_port": 8888,
|
||||
"documentation": "https://help.resilio.com/",
|
||||
"website": "https://www.resilio.com/sync",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/resilio-sync.webp",
|
||||
"description": "Fast, reliable, and simple file sync and share solution, powered by P2P technology. Sync files across all your devices without storing them in the cloud.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/resilio-sync.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 8,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "After free registration, you will receive a license keyfile to your email address. Upload it into any LXC directory and select on first run.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -48,7 +48,11 @@
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Login credentials: `cat ~/rustdesk.creds`",
|
||||
"text": "To set admin password on Debian, type `cd /var/lib/rustdesk-api && rustdesk-api reset-admin-pwd <yournewpasswordhere>` inside LXC.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "To see admin password on Alpine, type `cat ~/rustdesk.creds` inside LXC.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "Swizzin",
|
||||
"slug": "swizzin",
|
||||
"categories": [
|
||||
15
|
||||
13
|
||||
],
|
||||
"date_created": "2025-08-19",
|
||||
"type": "ct",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -73,7 +73,13 @@ function CategoryView() {
|
||||
};
|
||||
|
||||
const handleScriptClick = (scriptSlug: string) => {
|
||||
router.push(`/scripts?id=${scriptSlug}`);
|
||||
// Include category context when navigating to scripts
|
||||
const categoryName = selectedCategoryIndex !== null ? categories[selectedCategoryIndex]?.name : null;
|
||||
const queryParams = new URLSearchParams({ id: scriptSlug });
|
||||
if (categoryName) {
|
||||
queryParams.append("category", categoryName);
|
||||
}
|
||||
router.push(`/scripts?${queryParams.toString()}`);
|
||||
};
|
||||
|
||||
const navigateCategory = (direction: "prev" | "next") => {
|
||||
|
||||
@@ -38,6 +38,7 @@ const DataFetcher: React.FC = () => {
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [itemsPerPage, setItemsPerPage] = useState(25);
|
||||
const [sortConfig, setSortConfig] = useState<{ key: string; direction: "ascending" | "descending" } | null>(null);
|
||||
const nf = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 });
|
||||
|
||||
useEffect(() => {
|
||||
const fetchSummary = async () => {
|
||||
@@ -129,19 +130,24 @@ const DataFetcher: React.FC = () => {
|
||||
<p className="text-lg font-bold mt-4"> </p>
|
||||
<div className="mb-4 flex justify-between items-center">
|
||||
<p className="text-lg font-bold">
|
||||
{summary?.total_entries}
|
||||
{nf.format(
|
||||
summary?.total_entries ?? 0,
|
||||
)}
|
||||
{" "}
|
||||
results found
|
||||
</p>
|
||||
<p className="text-lg font">
|
||||
Status Legend: 🔄 installing
|
||||
{summary?.status_count.installing ?? 0}
|
||||
{" "}
|
||||
{nf.format(summary?.status_count.installing ?? 0)}
|
||||
{" "}
|
||||
| ✔️ completed
|
||||
{summary?.status_count.done ?? 0}
|
||||
{" "}
|
||||
{nf.format(summary?.status_count.done ?? 0)}
|
||||
{" "}
|
||||
| ❌ failed
|
||||
{summary?.status_count.failed ?? 0}
|
||||
{" "}
|
||||
{nf.format(summary?.status_count.failed ?? 0)}
|
||||
{" "}
|
||||
| ❓ unknown
|
||||
</p>
|
||||
|
||||
@@ -4,12 +4,7 @@ import Link from "next/link";
|
||||
|
||||
import type { Category } from "@/lib/types";
|
||||
|
||||
import {
|
||||
Accordion,
|
||||
AccordionContent,
|
||||
AccordionItem,
|
||||
AccordionTrigger,
|
||||
} from "@/components/ui/accordion";
|
||||
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
|
||||
import { formattedBadge } from "@/components/command-menu";
|
||||
import { basePath } from "@/config/site-config";
|
||||
import { cn } from "@/lib/utils";
|
||||
@@ -18,14 +13,16 @@ export default function ScriptAccordion({
|
||||
items,
|
||||
selectedScript,
|
||||
setSelectedScript,
|
||||
selectedCategory,
|
||||
setSelectedCategory,
|
||||
}: {
|
||||
items: Category[];
|
||||
selectedScript: string | null;
|
||||
setSelectedScript: (script: string | null) => void;
|
||||
selectedCategory: string | null;
|
||||
setSelectedCategory: (category: string | null) => void;
|
||||
}) {
|
||||
const [expandedItem, setExpandedItem] = useState<string | undefined>(
|
||||
undefined,
|
||||
);
|
||||
const [expandedItem, setExpandedItem] = useState<string | undefined>(undefined);
|
||||
const linkRefs = useRef<{ [key: string]: HTMLAnchorElement | null }>({});
|
||||
|
||||
const handleAccordionChange = (value: string | undefined) => {
|
||||
@@ -41,15 +38,27 @@ export default function ScriptAccordion({
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedScript) {
|
||||
const category = items.find(category =>
|
||||
category.scripts.some(script => script.slug === selectedScript),
|
||||
);
|
||||
let category;
|
||||
|
||||
// If we have a selected category, try to find the script in that specific category
|
||||
if (selectedCategory) {
|
||||
category = items.find(
|
||||
cat => cat.name === selectedCategory && cat.scripts.some(script => script.slug === selectedScript),
|
||||
);
|
||||
}
|
||||
|
||||
// Fallback: if no category is selected or script not found in selected category,
|
||||
// use the first category containing the script (backward compatibility)
|
||||
if (!category) {
|
||||
category = items.find(category => category.scripts.some(script => script.slug === selectedScript));
|
||||
}
|
||||
|
||||
if (category) {
|
||||
setExpandedItem(category.name);
|
||||
handleSelected(selectedScript);
|
||||
}
|
||||
}
|
||||
}, [selectedScript, items, handleSelected]);
|
||||
}, [selectedScript, selectedCategory, items, handleSelected]);
|
||||
return (
|
||||
<Accordion
|
||||
type="single"
|
||||
@@ -82,10 +91,7 @@ export default function ScriptAccordion({
|
||||
</div>
|
||||
{" "}
|
||||
</AccordionTrigger>
|
||||
<AccordionContent
|
||||
data-state={expandedItem === category.name ? "open" : "closed"}
|
||||
className="pt-0"
|
||||
>
|
||||
<AccordionContent data-state={expandedItem === category.name ? "open" : "closed"} className="pt-0">
|
||||
{category.scripts
|
||||
.slice()
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
@@ -94,7 +100,7 @@ export default function ScriptAccordion({
|
||||
<Link
|
||||
href={{
|
||||
pathname: "/scripts",
|
||||
query: { id: script.slug },
|
||||
query: { id: script.slug, category: category.name },
|
||||
}}
|
||||
prefetch={false}
|
||||
className={`flex cursor-pointer items-center justify-between gap-1 px-1 py-1 text-muted-foreground hover:rounded-lg hover:bg-accent/60 hover:dark:bg-accent/20 ${
|
||||
@@ -102,7 +108,10 @@ export default function ScriptAccordion({
|
||||
? "rounded-lg bg-accent font-semibold dark:bg-accent/30 dark:text-white"
|
||||
: ""
|
||||
}`}
|
||||
onClick={() => handleSelected(script.slug)}
|
||||
onClick={() => {
|
||||
handleSelected(script.slug);
|
||||
setSelectedCategory(category.name);
|
||||
}}
|
||||
ref={(el) => {
|
||||
linkRefs.current[script.slug] = el;
|
||||
}}
|
||||
@@ -113,15 +122,11 @@ export default function ScriptAccordion({
|
||||
height={16}
|
||||
width={16}
|
||||
unoptimized
|
||||
onError={e =>
|
||||
((e.currentTarget as HTMLImageElement).src
|
||||
= `/${basePath}/logo.png`)}
|
||||
onError={e => ((e.currentTarget as HTMLImageElement).src = `/${basePath}/logo.png`)}
|
||||
alt={script.name}
|
||||
className="mr-1 w-4 h-4 rounded-full"
|
||||
/>
|
||||
<span className="flex items-center gap-2">
|
||||
{script.name}
|
||||
</span>
|
||||
<span className="flex items-center gap-2">{script.name}</span>
|
||||
</div>
|
||||
{formattedBadge(script.type)}
|
||||
</Link>
|
||||
|
||||
@@ -8,10 +8,14 @@ function Sidebar({
|
||||
items,
|
||||
selectedScript,
|
||||
setSelectedScript,
|
||||
selectedCategory,
|
||||
setSelectedCategory,
|
||||
}: {
|
||||
items: Category[];
|
||||
selectedScript: string | null;
|
||||
setSelectedScript: (script: string | null) => void;
|
||||
selectedCategory: string | null;
|
||||
setSelectedCategory: (category: string | null) => void;
|
||||
}) {
|
||||
const uniqueScripts = items.reduce((acc, category) => {
|
||||
for (const script of category.scripts) {
|
||||
@@ -37,6 +41,8 @@ function Sidebar({
|
||||
items={items}
|
||||
selectedScript={selectedScript}
|
||||
setSelectedScript={setSelectedScript}
|
||||
selectedCategory={selectedCategory}
|
||||
setSelectedCategory={setSelectedCategory}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,16 +8,14 @@ import type { Category, Script } from "@/lib/types";
|
||||
import { ScriptItem } from "@/app/scripts/_components/script-item";
|
||||
import { fetchCategories } from "@/lib/data";
|
||||
|
||||
import {
|
||||
LatestScripts,
|
||||
MostViewedScripts,
|
||||
} from "./_components/script-info-blocks";
|
||||
import { LatestScripts, MostViewedScripts } from "./_components/script-info-blocks";
|
||||
import Sidebar from "./_components/sidebar";
|
||||
|
||||
export const dynamic = "force-static";
|
||||
|
||||
function ScriptContent() {
|
||||
const [selectedScript, setSelectedScript] = useQueryState("id");
|
||||
const [selectedCategory, setSelectedCategory] = useQueryState("category");
|
||||
const [links, setLinks] = useState<Category[]>([]);
|
||||
const [item, setItem] = useState<Script>();
|
||||
|
||||
@@ -47,6 +45,8 @@ function ScriptContent() {
|
||||
items={links}
|
||||
selectedScript={selectedScript}
|
||||
setSelectedScript={setSelectedScript}
|
||||
selectedCategory={selectedCategory}
|
||||
setSelectedCategory={setSelectedCategory}
|
||||
/>
|
||||
</div>
|
||||
<div className="mx-4 w-full sm:mx-0 sm:ml-4">
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
"use client";
|
||||
|
||||
import type { VariantProps } from "class-variance-authority";
|
||||
|
||||
import { cva } from "class-variance-authority";
|
||||
import * as React from "react";
|
||||
|
||||
import type { ButtonProps as ButtonPrimitiveProps } from "@/components/animate-ui/primitives/buttons/button";
|
||||
|
||||
import {
|
||||
Button as ButtonPrimitive,
|
||||
|
||||
} from "@/components/animate-ui/primitives/buttons/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[box-shadow,_color,_background-color,_border-color,_outline-color,_text-decoration-color,_fill,_stroke] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default:
|
||||
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
||||
accent: "bg-accent text-accent-foreground shadow-xs hover:bg-accent/90",
|
||||
destructive:
|
||||
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
||||
outline:
|
||||
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
||||
secondary:
|
||||
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
||||
ghost:
|
||||
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
||||
link: "text-primary underline-offset-4 hover:underline",
|
||||
},
|
||||
size: {
|
||||
"default": "h-9 px-4 py-2 has-[>svg]:px-3",
|
||||
"sm": "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
||||
"lg": "h-10 rounded-md px-6 has-[>svg]:px-4",
|
||||
"icon": "size-9",
|
||||
"icon-sm": "size-8 rounded-md",
|
||||
"icon-lg": "size-10 rounded-md",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
size: "default",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
type ButtonProps = ButtonPrimitiveProps & VariantProps<typeof buttonVariants>;
|
||||
|
||||
function Button({ className, variant, size, ...props }: ButtonProps) {
|
||||
return (
|
||||
<ButtonPrimitive
|
||||
className={cn(buttonVariants({ variant, size, className }))}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export { Button, type ButtonProps, buttonVariants };
|
||||
@@ -0,0 +1,109 @@
|
||||
import type { VariantProps } from "class-variance-authority";
|
||||
|
||||
import { cva } from "class-variance-authority";
|
||||
import { StarIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
|
||||
import type { ButtonProps as ButtonPrimitiveProps } from "@/components/animate-ui/primitives/buttons/button";
|
||||
import type { GithubStarsProps } from "@/components/animate-ui/primitives/animate/github-stars";
|
||||
|
||||
import {
|
||||
GithubStars,
|
||||
GithubStarsIcon,
|
||||
GithubStarsLogo,
|
||||
GithubStarsNumber,
|
||||
GithubStarsParticles,
|
||||
} from "@/components/animate-ui/primitives/animate/github-stars";
|
||||
import { Button as ButtonPrimitive } from "@/components/animate-ui/primitives/buttons/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[box-shadow,_color,_background-color,_border-color,_outline-color,_text-decoration-color,_fill,_stroke] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
||||
accent: "bg-accent text-accent-foreground shadow-xs hover:bg-accent/90",
|
||||
outline:
|
||||
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
||||
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
||||
},
|
||||
size: {
|
||||
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
||||
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
||||
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
size: "default",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const buttonStarVariants = cva("", {
|
||||
variants: {
|
||||
variant: {
|
||||
default: "fill-neutral-700 stroke-neutral-700 dark:fill-neutral-300 dark:stroke-neutral-300",
|
||||
accent: "fill-neutral-300 stroke-neutral-300 dark:fill-neutral-700 dark:stroke-neutral-700",
|
||||
outline: "fill-neutral-300 stroke-neutral-300 dark:fill-neutral-700 dark:stroke-neutral-700",
|
||||
ghost: "fill-neutral-300 stroke-neutral-300 dark:fill-neutral-700 dark:stroke-neutral-700",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
},
|
||||
});
|
||||
|
||||
type GitHubStarsButtonProps = Omit<ButtonPrimitiveProps & GithubStarsProps, "asChild" | "children">
|
||||
& VariantProps<typeof buttonVariants>;
|
||||
|
||||
function GitHubStarsButton({
|
||||
className,
|
||||
username,
|
||||
repo,
|
||||
value,
|
||||
delay,
|
||||
inView,
|
||||
inViewMargin,
|
||||
inViewOnce,
|
||||
variant,
|
||||
size,
|
||||
...props
|
||||
}: GitHubStarsButtonProps) {
|
||||
return (
|
||||
<Link
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
data-umami-event="github-stars"
|
||||
href={`https://github.com/${username}/${repo}`}
|
||||
>
|
||||
<GithubStars
|
||||
asChild
|
||||
username={username}
|
||||
repo={repo}
|
||||
value={value}
|
||||
delay={delay}
|
||||
inView={inView}
|
||||
inViewMargin={inViewMargin}
|
||||
inViewOnce={inViewOnce}
|
||||
>
|
||||
<ButtonPrimitive className={cn(buttonVariants({ variant, size, className }))} {...props}>
|
||||
<GithubStarsLogo />
|
||||
<GithubStarsNumber />
|
||||
<GithubStarsParticles className="text-yellow-500">
|
||||
<GithubStarsIcon
|
||||
icon={StarIcon}
|
||||
data-variant={variant}
|
||||
className={cn(buttonStarVariants({ variant }))}
|
||||
activeClassName="text-yellow-500"
|
||||
size={18}
|
||||
/>
|
||||
</GithubStarsParticles>
|
||||
</ButtonPrimitive>
|
||||
</GithubStars>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
export { GitHubStarsButton, type GitHubStarsButtonProps };
|
||||
@@ -0,0 +1,206 @@
|
||||
"use client";
|
||||
|
||||
import type { HTMLMotionProps } from "motion/react";
|
||||
|
||||
import { motion } from "motion/react";
|
||||
import * as React from "react";
|
||||
|
||||
import type { SlidingNumberProps } from "@/components/animate-ui/primitives/texts/sliding-number";
|
||||
import type { ParticlesEffectProps } from "@/components/animate-ui/primitives/effects/particles";
|
||||
import type { WithAsChild } from "@/components/animate-ui/primitives/animate/slot";
|
||||
import type { UseIsInViewOptions } from "@/hooks/use-is-in-view";
|
||||
|
||||
import { Particles, ParticlesEffect } from "@/components/animate-ui/primitives/effects/particles";
|
||||
import { SlidingNumber } from "@/components/animate-ui/primitives/texts/sliding-number";
|
||||
import { Slot } from "@/components/animate-ui/primitives/animate/slot";
|
||||
import { getStrictContext } from "@/lib/get-strict-context";
|
||||
import { useIsInView } from "@/hooks/use-is-in-view";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type GithubStarsContextType = {
|
||||
stars: number;
|
||||
setStars: (stars: number) => void;
|
||||
currentStars: number;
|
||||
setCurrentStars: (stars: number) => void;
|
||||
isCompleted: boolean;
|
||||
isLoading: boolean;
|
||||
};
|
||||
|
||||
const [GithubStarsProvider, useGithubStars] = getStrictContext<GithubStarsContextType>("GithubStarsContext");
|
||||
|
||||
type GithubStarsProps = WithAsChild<
|
||||
{
|
||||
children: React.ReactNode;
|
||||
username?: string;
|
||||
repo?: string;
|
||||
value?: number;
|
||||
delay?: number;
|
||||
} & UseIsInViewOptions
|
||||
& HTMLMotionProps<"div">
|
||||
>;
|
||||
|
||||
function GithubStars({
|
||||
ref,
|
||||
children,
|
||||
username,
|
||||
repo,
|
||||
value,
|
||||
delay = 0,
|
||||
inView = false,
|
||||
inViewMargin = "0px",
|
||||
inViewOnce = true,
|
||||
asChild = false,
|
||||
...props
|
||||
}: GithubStarsProps) {
|
||||
const { ref: localRef, isInView } = useIsInView(ref as React.Ref<HTMLDivElement>, {
|
||||
inView,
|
||||
inViewOnce,
|
||||
inViewMargin,
|
||||
});
|
||||
|
||||
const [stars, setStars] = React.useState(value ?? 0);
|
||||
const [currentStars, setCurrentStars] = React.useState(0);
|
||||
const [isLoading, setIsLoading] = React.useState(true);
|
||||
const isCompleted = React.useMemo(() => currentStars === stars, [currentStars, stars]);
|
||||
|
||||
const Component = asChild ? Slot : motion.div;
|
||||
|
||||
React.useEffect(() => {
|
||||
if (value !== undefined && username && repo)
|
||||
return;
|
||||
if (!isInView) {
|
||||
setStars(0);
|
||||
setIsLoading(true);
|
||||
return;
|
||||
}
|
||||
|
||||
const timeout = setTimeout(() => {
|
||||
fetch(`https://api.github.com/repos/${username}/${repo}`)
|
||||
.then(response => response.json())
|
||||
.then((data) => {
|
||||
if (data && typeof data.stargazers_count === "number") {
|
||||
setStars(data.stargazers_count);
|
||||
}
|
||||
})
|
||||
.catch(console.error)
|
||||
.finally(() => setIsLoading(false));
|
||||
}, delay);
|
||||
|
||||
return () => clearTimeout(timeout);
|
||||
}, [username, repo, value, isInView, delay]);
|
||||
|
||||
return (
|
||||
<GithubStarsProvider
|
||||
value={{
|
||||
stars,
|
||||
currentStars,
|
||||
isCompleted,
|
||||
isLoading,
|
||||
setStars,
|
||||
setCurrentStars,
|
||||
}}
|
||||
>
|
||||
{!isLoading && (
|
||||
<Component ref={localRef} {...props}>
|
||||
{children}
|
||||
</Component>
|
||||
)}
|
||||
</GithubStarsProvider>
|
||||
);
|
||||
}
|
||||
|
||||
type GithubStarsNumberProps = Omit<SlidingNumberProps, "number" | "fromNumber">;
|
||||
|
||||
function GithubStarsNumber({ padStart = true, ...props }: GithubStarsNumberProps) {
|
||||
const { stars, setCurrentStars } = useGithubStars();
|
||||
|
||||
return (
|
||||
<SlidingNumber number={stars} fromNumber={0} onNumberChange={setCurrentStars} padStart={padStart} {...props} />
|
||||
);
|
||||
}
|
||||
|
||||
type GithubStarsIconProps<T extends React.ElementType> = {
|
||||
icon: React.ReactElement<T>;
|
||||
color?: string;
|
||||
activeClassName?: string;
|
||||
} & React.ComponentProps<T>;
|
||||
|
||||
function GithubStarsIcon<T extends React.ElementType>({
|
||||
icon: Icon,
|
||||
color = "currentColor",
|
||||
activeClassName,
|
||||
className,
|
||||
...props
|
||||
}: GithubStarsIconProps<T>) {
|
||||
const { stars, currentStars, isCompleted } = useGithubStars();
|
||||
const fillPercentage = (currentStars / stars) * 100;
|
||||
|
||||
return (
|
||||
<div style={{ position: "relative" }}>
|
||||
<Icon aria-hidden="true" className={cn(className)} {...props} />
|
||||
<Icon
|
||||
aria-hidden="true"
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
fill: color,
|
||||
stroke: color,
|
||||
clipPath: `inset(${100 - (isCompleted ? fillPercentage : fillPercentage - 10)}% 0 0 0)`,
|
||||
}}
|
||||
className={cn(className, activeClassName)}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
type GithubStarsParticlesProps = ParticlesEffectProps & {
|
||||
children: React.ReactElement;
|
||||
size?: number;
|
||||
};
|
||||
|
||||
function GithubStarsParticles({ children, size = 4, style, ...props }: GithubStarsParticlesProps) {
|
||||
const { isCompleted } = useGithubStars();
|
||||
|
||||
return (
|
||||
<Particles animate={isCompleted}>
|
||||
{children}
|
||||
<ParticlesEffect
|
||||
style={{
|
||||
backgroundColor: "currentcolor",
|
||||
borderRadius: "50%",
|
||||
width: size,
|
||||
height: size,
|
||||
...style,
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
</Particles>
|
||||
);
|
||||
}
|
||||
|
||||
type GithubStarsLogoProps = React.SVGProps<SVGSVGElement>;
|
||||
|
||||
function GithubStarsLogo(props: GithubStarsLogoProps) {
|
||||
return (
|
||||
<svg role="img" viewBox="0 0 24 24" fill="currentColor" aria-label="GitHub" {...props}>
|
||||
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
GithubStars,
|
||||
type GithubStarsContextType,
|
||||
GithubStarsIcon,
|
||||
type GithubStarsIconProps,
|
||||
GithubStarsLogo,
|
||||
type GithubStarsLogoProps,
|
||||
GithubStarsNumber,
|
||||
type GithubStarsNumberProps,
|
||||
GithubStarsParticles,
|
||||
type GithubStarsParticlesProps,
|
||||
type GithubStarsProps,
|
||||
useGithubStars,
|
||||
};
|
||||
101
frontend/src/components/animate-ui/primitives/animate/slot.tsx
Normal file
101
frontend/src/components/animate-ui/primitives/animate/slot.tsx
Normal file
@@ -0,0 +1,101 @@
|
||||
"use client";
|
||||
|
||||
import type { HTMLMotionProps } from "motion/react";
|
||||
|
||||
import { isMotionComponent, motion } from "motion/react";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type AnyProps = Record<string, unknown>;
|
||||
|
||||
type DOMMotionProps<T extends HTMLElement = HTMLElement> = Omit<
|
||||
HTMLMotionProps<keyof HTMLElementTagNameMap>,
|
||||
"ref"
|
||||
> & { ref?: React.Ref<T> };
|
||||
|
||||
type WithAsChild<Base extends object>
|
||||
= | (Base & { asChild: true; children: React.ReactElement })
|
||||
| (Base & { asChild?: false | undefined });
|
||||
|
||||
type SlotProps<T extends HTMLElement = HTMLElement> = {
|
||||
children?: any;
|
||||
} & DOMMotionProps<T>;
|
||||
|
||||
function mergeRefs<T>(
|
||||
...refs: (React.Ref<T> | undefined)[]
|
||||
): React.RefCallback<T> {
|
||||
return (node) => {
|
||||
refs.forEach((ref) => {
|
||||
if (!ref)
|
||||
return;
|
||||
if (typeof ref === "function") {
|
||||
ref(node);
|
||||
}
|
||||
else {
|
||||
(ref as React.RefObject<T | null>).current = node;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function mergeProps<T extends HTMLElement>(
|
||||
childProps: AnyProps,
|
||||
slotProps: DOMMotionProps<T>,
|
||||
): AnyProps {
|
||||
const merged: AnyProps = { ...childProps, ...slotProps };
|
||||
|
||||
if (childProps.className || slotProps.className) {
|
||||
merged.className = cn(
|
||||
childProps.className as string,
|
||||
slotProps.className as string,
|
||||
);
|
||||
}
|
||||
|
||||
if (childProps.style || slotProps.style) {
|
||||
merged.style = {
|
||||
...(childProps.style as React.CSSProperties),
|
||||
...(slotProps.style as React.CSSProperties),
|
||||
};
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
function Slot<T extends HTMLElement = HTMLElement>({
|
||||
children,
|
||||
ref,
|
||||
...props
|
||||
}: SlotProps<T>) {
|
||||
const isAlreadyMotion
|
||||
= typeof children.type === "object"
|
||||
&& children.type !== null
|
||||
&& isMotionComponent(children.type);
|
||||
|
||||
const Base = React.useMemo(
|
||||
() =>
|
||||
isAlreadyMotion
|
||||
? (children.type as React.ElementType)
|
||||
: motion.create(children.type as React.ElementType),
|
||||
[isAlreadyMotion, children.type],
|
||||
);
|
||||
|
||||
if (!React.isValidElement(children))
|
||||
return null;
|
||||
|
||||
const { ref: childRef, ...childProps } = children.props as AnyProps;
|
||||
|
||||
const mergedProps = mergeProps(childProps, props);
|
||||
|
||||
return (
|
||||
<Base {...mergedProps} ref={mergeRefs(childRef as React.Ref<T>, ref)} />
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
type AnyProps,
|
||||
type DOMMotionProps,
|
||||
Slot,
|
||||
type SlotProps,
|
||||
type WithAsChild,
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
"use client";
|
||||
|
||||
import type { HTMLMotionProps } from "motion/react";
|
||||
|
||||
import { motion } from "motion/react";
|
||||
import * as React from "react";
|
||||
|
||||
import type { WithAsChild } from "@/components/animate-ui/primitives/animate/slot";
|
||||
|
||||
import { Slot } from "@/components/animate-ui/primitives/animate/slot";
|
||||
|
||||
type ButtonProps = WithAsChild<
|
||||
HTMLMotionProps<"button"> & {
|
||||
hoverScale?: number;
|
||||
tapScale?: number;
|
||||
}
|
||||
>;
|
||||
|
||||
function Button({
|
||||
hoverScale = 1.05,
|
||||
tapScale = 0.95,
|
||||
asChild = false,
|
||||
...props
|
||||
}: ButtonProps) {
|
||||
const Component = asChild ? Slot : motion.button;
|
||||
|
||||
return (
|
||||
<Component
|
||||
whileTap={{ scale: tapScale }}
|
||||
whileHover={{ scale: hoverScale }}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export { Button, type ButtonProps };
|
||||
@@ -0,0 +1,160 @@
|
||||
"use client";
|
||||
|
||||
import type { HTMLMotionProps } from "motion/react";
|
||||
|
||||
import { AnimatePresence, motion } from "motion/react";
|
||||
import * as React from "react";
|
||||
|
||||
import type { WithAsChild } from "@/components/animate-ui/primitives/animate/slot";
|
||||
import type { UseIsInViewOptions } from "@/hooks/use-is-in-view";
|
||||
|
||||
import { Slot } from "@/components/animate-ui/primitives/animate/slot";
|
||||
import { getStrictContext } from "@/lib/get-strict-context";
|
||||
import {
|
||||
useIsInView,
|
||||
|
||||
} from "@/hooks/use-is-in-view";
|
||||
|
||||
type Side = "top" | "bottom" | "left" | "right";
|
||||
type Align = "start" | "center" | "end";
|
||||
|
||||
type ParticlesContextType = {
|
||||
animate: boolean;
|
||||
isInView: boolean;
|
||||
};
|
||||
|
||||
const [ParticlesProvider, useParticles]
|
||||
= getStrictContext<ParticlesContextType>("ParticlesContext");
|
||||
|
||||
type ParticlesProps = WithAsChild<
|
||||
Omit<HTMLMotionProps<"div">, "children"> & {
|
||||
animate?: boolean;
|
||||
children: React.ReactNode;
|
||||
} & UseIsInViewOptions
|
||||
>;
|
||||
|
||||
function Particles({
|
||||
ref,
|
||||
animate = true,
|
||||
asChild = false,
|
||||
inView = false,
|
||||
inViewMargin = "0px",
|
||||
inViewOnce = true,
|
||||
children,
|
||||
style,
|
||||
...props
|
||||
}: ParticlesProps) {
|
||||
const { ref: localRef, isInView } = useIsInView(
|
||||
ref as React.Ref<HTMLDivElement>,
|
||||
{ inView, inViewOnce, inViewMargin },
|
||||
);
|
||||
|
||||
const Component = asChild ? Slot : motion.div;
|
||||
|
||||
return (
|
||||
<ParticlesProvider value={{ animate, isInView }}>
|
||||
<Component
|
||||
ref={localRef}
|
||||
style={{ position: "relative", ...style }}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</Component>
|
||||
</ParticlesProvider>
|
||||
);
|
||||
}
|
||||
|
||||
type ParticlesEffectProps = Omit<HTMLMotionProps<"div">, "children"> & {
|
||||
side?: Side;
|
||||
align?: Align;
|
||||
count?: number;
|
||||
radius?: number;
|
||||
spread?: number;
|
||||
duration?: number;
|
||||
holdDelay?: number;
|
||||
sideOffset?: number;
|
||||
alignOffset?: number;
|
||||
delay?: number;
|
||||
};
|
||||
|
||||
function ParticlesEffect({
|
||||
side = "top",
|
||||
align = "center",
|
||||
count = 6,
|
||||
radius = 30,
|
||||
spread = 360,
|
||||
duration = 0.8,
|
||||
holdDelay = 0.05,
|
||||
sideOffset = 0,
|
||||
alignOffset = 0,
|
||||
delay = 0,
|
||||
transition,
|
||||
style,
|
||||
...props
|
||||
}: ParticlesEffectProps) {
|
||||
const { animate, isInView } = useParticles();
|
||||
|
||||
const isVertical = side === "top" || side === "bottom";
|
||||
const alignPct = align === "start" ? "0%" : align === "end" ? "100%" : "50%";
|
||||
|
||||
const top = isVertical
|
||||
? side === "top"
|
||||
? `calc(0% - ${sideOffset}px)`
|
||||
: `calc(100% + ${sideOffset}px)`
|
||||
: `calc(${alignPct} + ${alignOffset}px)`;
|
||||
|
||||
const left = isVertical
|
||||
? `calc(${alignPct} + ${alignOffset}px)`
|
||||
: side === "left"
|
||||
? `calc(0% - ${sideOffset}px)`
|
||||
: `calc(100% + ${sideOffset}px)`;
|
||||
|
||||
const containerStyle: React.CSSProperties = {
|
||||
position: "absolute",
|
||||
top,
|
||||
left,
|
||||
transform: "translate(-50%, -50%)",
|
||||
};
|
||||
|
||||
const angleStep = (spread * (Math.PI / 180)) / Math.max(1, count - 1);
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
{animate
|
||||
&& isInView
|
||||
&& Array.from({ length: count }).map((_, i) => {
|
||||
const angle = i * angleStep;
|
||||
const x = Math.cos(angle) * radius;
|
||||
const y = Math.sin(angle) * radius;
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
key={i}
|
||||
style={{ ...containerStyle, ...style }}
|
||||
initial={{ scale: 0, opacity: 0 }}
|
||||
animate={{
|
||||
x: `${x}px`,
|
||||
y: `${y}px`,
|
||||
scale: [0, 1, 0],
|
||||
opacity: [0, 1, 0],
|
||||
}}
|
||||
transition={{
|
||||
duration,
|
||||
delay: delay + i * holdDelay,
|
||||
ease: "easeOut",
|
||||
...transition,
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</AnimatePresence>
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
Particles,
|
||||
ParticlesEffect,
|
||||
type ParticlesEffectProps,
|
||||
type ParticlesProps,
|
||||
};
|
||||
@@ -0,0 +1,338 @@
|
||||
"use client";
|
||||
|
||||
import type { MotionValue, SpringOptions } from "motion/react";
|
||||
|
||||
import {
|
||||
motion,
|
||||
|
||||
useMotionValue,
|
||||
useSpring,
|
||||
useTransform,
|
||||
} from "motion/react";
|
||||
import useMeasure from "react-use-measure";
|
||||
import * as React from "react";
|
||||
|
||||
import type { UseIsInViewOptions } from "@/hooks/use-is-in-view";
|
||||
|
||||
import {
|
||||
useIsInView,
|
||||
|
||||
} from "@/hooks/use-is-in-view";
|
||||
|
||||
type SlidingNumberRollerProps = {
|
||||
prevValue: number;
|
||||
value: number;
|
||||
place: number;
|
||||
transition: SpringOptions;
|
||||
delay?: number;
|
||||
};
|
||||
|
||||
function SlidingNumberRoller({
|
||||
prevValue,
|
||||
value,
|
||||
place,
|
||||
transition,
|
||||
delay = 0,
|
||||
}: SlidingNumberRollerProps) {
|
||||
const startNumber = Math.floor(prevValue / place) % 10;
|
||||
const targetNumber = Math.floor(value / place) % 10;
|
||||
const animatedValue = useSpring(startNumber, transition);
|
||||
|
||||
React.useEffect(() => {
|
||||
const timeoutId = setTimeout(() => {
|
||||
animatedValue.set(targetNumber);
|
||||
}, delay);
|
||||
return () => clearTimeout(timeoutId);
|
||||
}, [targetNumber, animatedValue, delay]);
|
||||
|
||||
const [measureRef, { height }] = useMeasure();
|
||||
|
||||
return (
|
||||
<span
|
||||
ref={measureRef}
|
||||
data-slot="sliding-number-roller"
|
||||
style={{
|
||||
position: "relative",
|
||||
display: "inline-block",
|
||||
width: "1ch",
|
||||
overflowX: "visible",
|
||||
overflowY: "clip",
|
||||
lineHeight: 1,
|
||||
fontVariantNumeric: "tabular-nums",
|
||||
}}
|
||||
>
|
||||
<span style={{ visibility: "hidden" }}>0</span>
|
||||
{Array.from({ length: 10 }, (_, i) => (
|
||||
<SlidingNumberDisplay
|
||||
key={i}
|
||||
motionValue={animatedValue}
|
||||
number={i}
|
||||
height={height}
|
||||
transition={transition}
|
||||
/>
|
||||
))}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
type SlidingNumberDisplayProps = {
|
||||
motionValue: MotionValue<number>;
|
||||
number: number;
|
||||
height: number;
|
||||
transition: SpringOptions;
|
||||
};
|
||||
|
||||
function SlidingNumberDisplay({
|
||||
motionValue,
|
||||
number,
|
||||
height,
|
||||
transition,
|
||||
}: SlidingNumberDisplayProps) {
|
||||
const y = useTransform(motionValue, (latest) => {
|
||||
if (!height)
|
||||
return 0;
|
||||
const currentNumber = latest % 10;
|
||||
const offset = (10 + number - currentNumber) % 10;
|
||||
let translateY = offset * height;
|
||||
if (offset > 5)
|
||||
translateY -= 10 * height;
|
||||
return translateY;
|
||||
});
|
||||
|
||||
if (!height) {
|
||||
return (
|
||||
<span style={{ visibility: "hidden", position: "absolute" }}>
|
||||
{number}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.span
|
||||
data-slot="sliding-number-display"
|
||||
style={{
|
||||
y,
|
||||
position: "absolute",
|
||||
inset: 0,
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
transition={{ ...transition, type: "spring" }}
|
||||
>
|
||||
{number}
|
||||
</motion.span>
|
||||
);
|
||||
}
|
||||
|
||||
type SlidingNumberProps = Omit<React.ComponentProps<"span">, "children"> & {
|
||||
number: number;
|
||||
fromNumber?: number;
|
||||
onNumberChange?: (number: number) => void;
|
||||
padStart?: boolean;
|
||||
decimalSeparator?: string;
|
||||
decimalPlaces?: number;
|
||||
thousandSeparator?: string;
|
||||
transition?: SpringOptions;
|
||||
delay?: number;
|
||||
} & UseIsInViewOptions;
|
||||
|
||||
function SlidingNumber({
|
||||
ref,
|
||||
number,
|
||||
fromNumber,
|
||||
onNumberChange,
|
||||
inView = false,
|
||||
inViewMargin = "0px",
|
||||
inViewOnce = true,
|
||||
padStart = false,
|
||||
decimalSeparator = ".",
|
||||
decimalPlaces = 0,
|
||||
thousandSeparator,
|
||||
transition = { stiffness: 200, damping: 20, mass: 0.4 },
|
||||
delay = 0,
|
||||
...props
|
||||
}: SlidingNumberProps) {
|
||||
const { ref: localRef, isInView } = useIsInView(
|
||||
ref as React.Ref<HTMLElement>,
|
||||
{
|
||||
inView,
|
||||
inViewOnce,
|
||||
inViewMargin,
|
||||
},
|
||||
);
|
||||
|
||||
const prevNumberRef = React.useRef<number>(0);
|
||||
|
||||
const hasAnimated = fromNumber !== undefined;
|
||||
const motionVal = useMotionValue(fromNumber ?? 0);
|
||||
const springVal = useSpring(motionVal, { stiffness: 90, damping: 50 });
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!hasAnimated)
|
||||
return;
|
||||
const timeoutId = setTimeout(() => {
|
||||
if (isInView)
|
||||
motionVal.set(number);
|
||||
}, delay);
|
||||
return () => clearTimeout(timeoutId);
|
||||
}, [hasAnimated, isInView, number, motionVal, delay]);
|
||||
|
||||
const [effectiveNumber, setEffectiveNumber] = React.useState(0);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (hasAnimated) {
|
||||
const inferredDecimals
|
||||
= typeof decimalPlaces === "number" && decimalPlaces >= 0
|
||||
? decimalPlaces
|
||||
: (() => {
|
||||
const s = String(number);
|
||||
const idx = s.indexOf(".");
|
||||
return idx >= 0 ? s.length - idx - 1 : 0;
|
||||
})();
|
||||
|
||||
const factor = 10 ** inferredDecimals;
|
||||
|
||||
const unsubscribe = springVal.on("change", (latest: number) => {
|
||||
const newValue
|
||||
= inferredDecimals > 0
|
||||
? Math.round(latest * factor) / factor
|
||||
: Math.round(latest);
|
||||
|
||||
if (effectiveNumber !== newValue) {
|
||||
setEffectiveNumber(newValue);
|
||||
onNumberChange?.(newValue);
|
||||
}
|
||||
});
|
||||
return () => unsubscribe();
|
||||
}
|
||||
else {
|
||||
setEffectiveNumber(!isInView ? 0 : Math.abs(Number(number)));
|
||||
}
|
||||
}, [
|
||||
hasAnimated,
|
||||
springVal,
|
||||
isInView,
|
||||
number,
|
||||
decimalPlaces,
|
||||
onNumberChange,
|
||||
effectiveNumber,
|
||||
]);
|
||||
|
||||
const formatNumber = React.useCallback(
|
||||
(num: number) =>
|
||||
decimalPlaces != null ? num.toFixed(decimalPlaces) : num.toString(),
|
||||
[decimalPlaces],
|
||||
);
|
||||
|
||||
const numberStr = formatNumber(effectiveNumber);
|
||||
const [newIntStrRaw, newDecStrRaw = ""] = numberStr.split(".");
|
||||
|
||||
const finalIntLength = padStart
|
||||
? Math.max(
|
||||
Math.floor(Math.abs(number)).toString().length,
|
||||
newIntStrRaw.length,
|
||||
)
|
||||
: newIntStrRaw.length;
|
||||
|
||||
const newIntStr = padStart
|
||||
? newIntStrRaw.padStart(finalIntLength, "0")
|
||||
: newIntStrRaw;
|
||||
|
||||
const prevFormatted = formatNumber(prevNumberRef.current);
|
||||
const [prevIntStrRaw = "", prevDecStrRaw = ""] = prevFormatted.split(".");
|
||||
const prevIntStr = padStart
|
||||
? prevIntStrRaw.padStart(finalIntLength, "0")
|
||||
: prevIntStrRaw;
|
||||
|
||||
const adjustedPrevInt = React.useMemo(() => {
|
||||
return prevIntStr.length > finalIntLength
|
||||
? prevIntStr.slice(-finalIntLength)
|
||||
: prevIntStr.padStart(finalIntLength, "0");
|
||||
}, [prevIntStr, finalIntLength]);
|
||||
|
||||
const adjustedPrevDec = React.useMemo(() => {
|
||||
if (!newDecStrRaw)
|
||||
return "";
|
||||
return prevDecStrRaw.length > newDecStrRaw.length
|
||||
? prevDecStrRaw.slice(0, newDecStrRaw.length)
|
||||
: prevDecStrRaw.padEnd(newDecStrRaw.length, "0");
|
||||
}, [prevDecStrRaw, newDecStrRaw]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (isInView)
|
||||
prevNumberRef.current = effectiveNumber;
|
||||
}, [effectiveNumber, isInView]);
|
||||
|
||||
const intPlaces = React.useMemo(
|
||||
() =>
|
||||
Array.from({ length: finalIntLength }, (_, i) =>
|
||||
10 ** (finalIntLength - i - 1)),
|
||||
[finalIntLength],
|
||||
);
|
||||
const decPlaces = React.useMemo(
|
||||
() =>
|
||||
newDecStrRaw
|
||||
? Array.from({ length: newDecStrRaw.length }, (_, i) =>
|
||||
10 ** (newDecStrRaw.length - i - 1))
|
||||
: [],
|
||||
[newDecStrRaw],
|
||||
);
|
||||
|
||||
const newDecValue = newDecStrRaw ? Number.parseInt(newDecStrRaw, 10) : 0;
|
||||
const prevDecValue = adjustedPrevDec ? Number.parseInt(adjustedPrevDec, 10) : 0;
|
||||
|
||||
return (
|
||||
<span
|
||||
ref={localRef}
|
||||
data-slot="sliding-number"
|
||||
style={{
|
||||
display: "inline-flex",
|
||||
alignItems: "center",
|
||||
}}
|
||||
{...props}
|
||||
>
|
||||
{isInView && Number(number) < 0 && (
|
||||
<span style={{ marginRight: "0.25rem" }}>-</span>
|
||||
)}
|
||||
|
||||
{intPlaces.map((place, idx) => {
|
||||
const digitsToRight = intPlaces.length - idx - 1;
|
||||
const isSeparatorPosition
|
||||
= typeof thousandSeparator !== "undefined"
|
||||
&& digitsToRight > 0
|
||||
&& digitsToRight % 3 === 0;
|
||||
|
||||
return (
|
||||
<React.Fragment key={`int-${place}`}>
|
||||
<SlidingNumberRoller
|
||||
prevValue={Number.parseInt(adjustedPrevInt, 10)}
|
||||
value={Number.parseInt(newIntStr ?? "0", 10)}
|
||||
place={place}
|
||||
transition={transition}
|
||||
/>
|
||||
{isSeparatorPosition && <span>{thousandSeparator}</span>}
|
||||
</React.Fragment>
|
||||
);
|
||||
})}
|
||||
|
||||
{newDecStrRaw && (
|
||||
<>
|
||||
<span>{decimalSeparator}</span>
|
||||
{decPlaces.map(place => (
|
||||
<SlidingNumberRoller
|
||||
key={`dec-${place}`}
|
||||
prevValue={prevDecValue}
|
||||
value={newDecValue}
|
||||
place={place}
|
||||
transition={transition}
|
||||
delay={delay}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export { SlidingNumber, type SlidingNumberProps };
|
||||
@@ -36,19 +36,24 @@ export function formattedBadge(type: string) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// random Script
|
||||
function getRandomScript(categories: Category[]): Script | null {
|
||||
function getRandomScript(categories: Category[], previouslySelected: Set<string> = new Set()): Script | null {
|
||||
const allScripts = categories.flatMap(cat => cat.scripts || []);
|
||||
if (allScripts.length === 0)
|
||||
return null;
|
||||
const idx = Math.floor(Math.random() * allScripts.length);
|
||||
return allScripts[idx];
|
||||
|
||||
const availableScripts = allScripts.filter(script => !previouslySelected.has(script.slug));
|
||||
if (availableScripts.length === 0) {
|
||||
return allScripts[Math.floor(Math.random() * allScripts.length)];
|
||||
}
|
||||
const idx = Math.floor(Math.random() * availableScripts.length);
|
||||
return availableScripts[idx];
|
||||
}
|
||||
|
||||
export default function CommandMenu() {
|
||||
function CommandMenu() {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const [links, setLinks] = React.useState<Category[]>([]);
|
||||
const [isLoading, setIsLoading] = React.useState(false);
|
||||
const [selectedScripts, setSelectedScripts] = React.useState<Set<string>>(new Set());
|
||||
const router = useRouter();
|
||||
|
||||
const fetchSortedCategories = () => {
|
||||
@@ -65,25 +70,26 @@ export default function CommandMenu() {
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
const down = (e: KeyboardEvent) => {
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
||||
e.preventDefault();
|
||||
fetchSortedCategories();
|
||||
setOpen(open => !open);
|
||||
}
|
||||
};
|
||||
document.addEventListener("keydown", down);
|
||||
return () => document.removeEventListener("keydown", down);
|
||||
document.addEventListener("keydown", handleKeyDown);
|
||||
return () => document.removeEventListener("keydown", handleKeyDown);
|
||||
}, []);
|
||||
|
||||
const openRandomScript = async () => {
|
||||
const handleOpenRandomScript = async () => {
|
||||
if (links.length === 0) {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const categories = await fetchCategories();
|
||||
setLinks(categories);
|
||||
const randomScript = getRandomScript(categories);
|
||||
const randomScript = getRandomScript(categories, selectedScripts);
|
||||
if (randomScript) {
|
||||
setSelectedScripts(prev => new Set([...prev, randomScript.slug]));
|
||||
router.push(`/scripts?id=${randomScript.slug}`);
|
||||
}
|
||||
}
|
||||
@@ -92,13 +98,54 @@ export default function CommandMenu() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
const randomScript = getRandomScript(links);
|
||||
const randomScript = getRandomScript(links, selectedScripts);
|
||||
if (randomScript) {
|
||||
setSelectedScripts(prev => new Set([...prev, randomScript.slug]));
|
||||
router.push(`/scripts?id=${randomScript.slug}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const getUniqueScriptsMap = React.useCallback(() => {
|
||||
const scriptMap = new Map<string, { script: Script; categoryName: string }>();
|
||||
for (const category of links) {
|
||||
for (const script of category.scripts) {
|
||||
if (!scriptMap.has(script.slug)) {
|
||||
scriptMap.set(script.slug, { script, categoryName: category.name });
|
||||
}
|
||||
}
|
||||
}
|
||||
return scriptMap;
|
||||
}, [links]);
|
||||
|
||||
const getUniqueScriptsByCategory = React.useCallback(() => {
|
||||
const scriptMap = getUniqueScriptsMap();
|
||||
const categoryOrder = links.map(cat => cat.name);
|
||||
const grouped: Record<string, Script[]> = {};
|
||||
|
||||
for (const name of categoryOrder) {
|
||||
grouped[name] = [];
|
||||
}
|
||||
|
||||
for (const { script, categoryName } of scriptMap.values()) {
|
||||
if (grouped[categoryName]) {
|
||||
grouped[categoryName].push(script);
|
||||
}
|
||||
else {
|
||||
grouped[categoryName] = [script];
|
||||
}
|
||||
}
|
||||
|
||||
Object.keys(grouped).forEach((cat) => {
|
||||
if (grouped[cat].length === 0)
|
||||
delete grouped[cat];
|
||||
});
|
||||
|
||||
return grouped;
|
||||
}, [getUniqueScriptsMap, links]);
|
||||
|
||||
const uniqueScriptsByCategory = getUniqueScriptsByCategory();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex gap-2">
|
||||
@@ -122,7 +169,20 @@ export default function CommandMenu() {
|
||||
<TooltipProvider>
|
||||
<Tooltip delayDuration={100}>
|
||||
<TooltipTrigger asChild>
|
||||
<Button variant="outline" size="icon" onClick={openRandomScript} disabled={isLoading} className="hidden lg:flex">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
onClick={handleOpenRandomScript}
|
||||
disabled={isLoading}
|
||||
className="hidden lg:flex"
|
||||
aria-label="Open Random Script"
|
||||
tabIndex={0}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
handleOpenRandomScript();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Sparkles className="size-4" />
|
||||
<span className="sr-only">Open Random Script</span>
|
||||
</Button>
|
||||
@@ -139,16 +199,24 @@ export default function CommandMenu() {
|
||||
<CommandInput placeholder="Search for a script..." />
|
||||
<CommandList>
|
||||
<CommandEmpty>{isLoading ? "Loading..." : "No scripts found."}</CommandEmpty>
|
||||
{links.map(category => (
|
||||
<CommandGroup key={`category:${category.name}`} heading={category.name}>
|
||||
{category.scripts.map(script => (
|
||||
{Object.entries(uniqueScriptsByCategory).map(([categoryName, scripts]) => (
|
||||
<CommandGroup key={`category:${categoryName}`} heading={categoryName}>
|
||||
{scripts.map(script => (
|
||||
<CommandItem
|
||||
key={`script:${script.slug}`}
|
||||
value={`${script.slug}-${script.name}`}
|
||||
value={`${script.name}-${script.type}`}
|
||||
onSelect={() => {
|
||||
setOpen(false);
|
||||
router.push(`/scripts?id=${script.slug}`);
|
||||
}}
|
||||
tabIndex={0}
|
||||
aria-label={`Open script ${script.name}`}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
setOpen(false);
|
||||
router.push(`/scripts?id=${script.slug}`);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="flex gap-2" onClick={() => setOpen(false)}>
|
||||
<Image
|
||||
@@ -172,3 +240,5 @@ export default function CommandMenu() {
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default CommandMenu;
|
||||
|
||||
@@ -4,10 +4,10 @@ import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
import { navbarLinks } from "@/config/site-config";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
|
||||
import StarOnGithubButton from "./ui/star-on-github-button";
|
||||
import { GitHubStarsButton } from "./animate-ui/components/buttons/github-stars";
|
||||
import { Button } from "./animate-ui/components/buttons/button";
|
||||
import { ThemeToggle } from "./ui/theme-toggle";
|
||||
import CommandMenu from "./command-menu";
|
||||
|
||||
@@ -39,31 +39,18 @@ function Navbar() {
|
||||
href="/"
|
||||
className="flex cursor-pointer w-full justify-center sm:justify-start flex-row-reverse items-center gap-2 font-semibold sm:flex-row"
|
||||
>
|
||||
<Image
|
||||
height={18}
|
||||
unoptimized
|
||||
width={18}
|
||||
alt="logo"
|
||||
src="/ProxmoxVE/logo.png"
|
||||
className=""
|
||||
/>
|
||||
<Image height={18} unoptimized width={18} alt="logo" src="/ProxmoxVE/logo.png" className="" />
|
||||
<span className="hidden md:block">Proxmox VE Helper-Scripts</span>
|
||||
</Link>
|
||||
<div className="flex gap-2">
|
||||
<CommandMenu />
|
||||
<StarOnGithubButton />
|
||||
<GitHubStarsButton username="community-scripts" repo="ProxmoxVE" />
|
||||
{navbarLinks.map(({ href, event, icon, text, mobileHidden }) => (
|
||||
<TooltipProvider key={event}>
|
||||
<Tooltip delayDuration={100}>
|
||||
<TooltipTrigger
|
||||
className={mobileHidden ? "hidden lg:block" : ""}
|
||||
>
|
||||
<TooltipTrigger className={mobileHidden ? "hidden lg:block" : ""}>
|
||||
<Button variant="ghost" size="icon" asChild>
|
||||
<Link
|
||||
target="_blank"
|
||||
href={href}
|
||||
data-umami-event={event}
|
||||
>
|
||||
<Link target="_blank" href={href} data-umami-event={event}>
|
||||
{icon}
|
||||
<span className="sr-only">{text}</span>
|
||||
</Link>
|
||||
|
||||
27
frontend/src/hooks/use-is-in-view.tsx
Normal file
27
frontend/src/hooks/use-is-in-view.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { UseInViewOptions } from "motion/react";
|
||||
|
||||
import { useInView } from "motion/react";
|
||||
import * as React from "react";
|
||||
|
||||
type UseIsInViewOptions = {
|
||||
inView?: boolean;
|
||||
inViewOnce?: boolean;
|
||||
inViewMargin?: UseInViewOptions["margin"];
|
||||
};
|
||||
|
||||
function useIsInView<T extends HTMLElement = HTMLElement>(
|
||||
ref: React.Ref<T>,
|
||||
options: UseIsInViewOptions = {},
|
||||
) {
|
||||
const { inView, inViewOnce = false, inViewMargin = "0px" } = options;
|
||||
const localRef = React.useRef<T>(null);
|
||||
React.useImperativeHandle(ref, () => localRef.current as T);
|
||||
const inViewResult = useInView(localRef, {
|
||||
once: inViewOnce,
|
||||
margin: inViewMargin,
|
||||
});
|
||||
const isInView = !inView || inViewResult;
|
||||
return { ref: localRef, isInView };
|
||||
}
|
||||
|
||||
export { useIsInView, type UseIsInViewOptions };
|
||||
36
frontend/src/lib/get-strict-context.tsx
Normal file
36
frontend/src/lib/get-strict-context.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import * as React from "react";
|
||||
|
||||
function getStrictContext<T>(
|
||||
name?: string,
|
||||
): readonly [
|
||||
({
|
||||
value,
|
||||
children,
|
||||
}: {
|
||||
value: T;
|
||||
children?: React.ReactNode;
|
||||
}) => React.JSX.Element,
|
||||
() => T,
|
||||
] {
|
||||
const Context = React.createContext<T | undefined>(undefined);
|
||||
|
||||
const Provider = ({
|
||||
value,
|
||||
children,
|
||||
}: {
|
||||
value: T;
|
||||
children?: React.ReactNode;
|
||||
}) => <Context.Provider value={value}>{children}</Context.Provider>;
|
||||
|
||||
const useSafeContext = () => {
|
||||
const ctx = React.useContext(Context);
|
||||
if (ctx === undefined) {
|
||||
throw new Error(`useContext must be used within ${name ?? "a Provider"}`);
|
||||
}
|
||||
return ctx;
|
||||
};
|
||||
|
||||
return [Provider, useSafeContext] as const;
|
||||
}
|
||||
|
||||
export { getStrictContext };
|
||||
@@ -17,7 +17,9 @@ msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
gdal-bin \
|
||||
libgdal-dev \
|
||||
git
|
||||
git \
|
||||
memcached \
|
||||
libmemcached-tools
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
@@ -169,7 +169,8 @@ cd "$STAGING_DIR"
|
||||
SOURCE=${SOURCE_DIR}/libjxl
|
||||
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
|
||||
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
|
||||
: "${LIBJXL_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libjxl.json)}"
|
||||
# : "${LIBJXL_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libjxl.json)}"
|
||||
: "${LIBJXL_REVISION:=794a5dcf0d54f9f0b20d288a12e87afb91d20dfc}"
|
||||
$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE"
|
||||
cd "$SOURCE"
|
||||
$STD git reset --hard "$LIBJXL_REVISION"
|
||||
@@ -204,7 +205,8 @@ cd "$STAGING_DIR"
|
||||
rm -rf "$SOURCE"/{build,third_party}
|
||||
|
||||
SOURCE=${SOURCE_DIR}/libheif
|
||||
: "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}"
|
||||
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}"
|
||||
: "${LIBHEIF_REVISION:=35dad50a9145332a7bfdf1ff6aef6801fb613d68}"
|
||||
$STD git clone https://github.com/strukturag/libheif.git "$SOURCE"
|
||||
cd "$SOURCE"
|
||||
$STD git reset --hard "$LIBHEIF_REVISION"
|
||||
@@ -227,7 +229,8 @@ cd "$STAGING_DIR"
|
||||
rm -rf "$SOURCE"/build
|
||||
|
||||
SOURCE=${SOURCE_DIR}/libraw
|
||||
: "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}"
|
||||
# : "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}"
|
||||
: "${LIBRAW_REVISION:=09bea31181b43e97959ee5452d91e5bc66365f1f}"
|
||||
$STD git clone https://github.com/libraw/libraw.git "$SOURCE"
|
||||
cd "$SOURCE"
|
||||
$STD git reset --hard "$LIBRAW_REVISION"
|
||||
@@ -240,7 +243,8 @@ $STD make clean
|
||||
cd "$STAGING_DIR"
|
||||
|
||||
SOURCE=$SOURCE_DIR/imagemagick
|
||||
: "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/imagemagick.json)}"
|
||||
# : "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/imagemagick.json)}"
|
||||
: "${IMAGEMAGICK_REVISION:=8289a3388a085ad5ae81aa6812f21554bdfd54f2}"
|
||||
$STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE"
|
||||
cd "$SOURCE"
|
||||
$STD git reset --hard "$IMAGEMAGICK_REVISION"
|
||||
@@ -252,7 +256,8 @@ $STD make clean
|
||||
cd "$STAGING_DIR"
|
||||
|
||||
SOURCE=$SOURCE_DIR/libvips
|
||||
: "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}"
|
||||
# : "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}"
|
||||
: "${LIBVIPS_REVISION:=8fa37a64547e392d3808eed8d72adab7e02b3d00}"
|
||||
$STD git clone https://github.com/libvips/libvips.git "$SOURCE"
|
||||
cd "$SOURCE"
|
||||
$STD git reset --hard "$LIBVIPS_REVISION"
|
||||
@@ -280,7 +285,7 @@ GEO_DIR="${INSTALL_DIR}/geodata"
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
|
||||
|
||||
fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v1.140.0" "$SRC_DIR"
|
||||
fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v1.141.1" "$SRC_DIR"
|
||||
|
||||
msg_info "Installing ${APPLICATION} (more patience please)"
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ Wants=network.target karakeep-browser.service meilisearch.service
|
||||
After=network.target karakeep-browser.service meilisearch.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/node dist/index.mjs
|
||||
ExecStart=/usr/bin/node dist/index.js
|
||||
WorkingDirectory=/opt/karakeep/apps/workers
|
||||
EnvironmentFile=/etc/karakeep/karakeep.env
|
||||
Restart=always
|
||||
|
||||
78
install/leantime-install.sh
Normal file
78
install/leantime-install.sh
Normal file
@@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Stroopwafe1
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://leantime.io
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PHP_VERSION="8.4" PHP_MODULE="mysql" PHP_APACHE="YES" PHP_FPM="YES" setup_php
|
||||
setup_mariadb
|
||||
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME=leantime
|
||||
DB_USER=leantime
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$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 "Leantime Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/leantime.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz
|
||||
|
||||
msg_info "Setup Leantime"
|
||||
chown -R www-data:www-data "/opt/leantime"
|
||||
chmod -R 750 "/opt/leantime"
|
||||
cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /opt/leantime/public
|
||||
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml
|
||||
Options +ExecCGI
|
||||
|
||||
<Directory /opt/leantime/>
|
||||
Options FollowSymLinks
|
||||
Require all granted
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
|
||||
<Location />
|
||||
Require all granted
|
||||
</Location>
|
||||
|
||||
ErrorLog /var/log/apache2/error.log
|
||||
CustomLog /var/log/apache2/access.log combined
|
||||
</VirtualHost>
|
||||
EOF
|
||||
mv "/opt/leantime/config/sample.env" "/opt/leantime/config/.env"
|
||||
sed -i -e "s|^LEAN_DB_DATABASE.*|LEAN_DB_DATABASE = '$DB_NAME'|" \
|
||||
-e "s|^LEAN_DB_USER.*|LEAN_DB_USER = '$DB_USER'|" \
|
||||
-e "s|^LEAN_DB_PASSWORD.*|LEAN_DB_PASSWORD = '$DB_PASS'|" \
|
||||
-e "s|^LEAN_SESSION_PASSWORD.*|LEAN_SESSION_PASSWORD = '$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)'|" \
|
||||
"/opt/leantime/config/.env"
|
||||
$STD a2enmod -q proxy_fcgi setenvif rewrite
|
||||
$STD a2enconf -q "php8.4-fpm"
|
||||
sed -i -e "s/^;extension.\(curl\|fileinfo\|gd\|intl\|ldap\|mbstring\|exif\|mysqli\|odbc\|openssl\|pdo_mysql\)/extension=\1/g" "/etc/php/8.4/apache2/php.ini"
|
||||
systemctl restart apache2
|
||||
msg_ok "Setup leantime"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -15,12 +15,10 @@ update_os
|
||||
|
||||
msg_info "Installing Mosquitto MQTT Broker"
|
||||
source /etc/os-release
|
||||
curl -fsSL http://repo.mosquitto.org/debian/mosquitto-repo.gpg >/usr/share/keyrings/mosquitto-repo.gpg.key
|
||||
chmod go+r /usr/share/keyrings/mosquitto-repo.gpg.key
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mosquitto-repo.gpg.key] http://repo.mosquitto.org/debian ${VERSION_CODENAME} main" >/etc/apt/sources.list.d/mosquitto.list
|
||||
$STD apt-get update
|
||||
$STD apt-get -y install mosquitto
|
||||
$STD apt-get -y install mosquitto-clients
|
||||
|
||||
cat <<EOF >/etc/mosquitto/conf.d/default.conf
|
||||
allow_anonymous false
|
||||
persistence true
|
||||
|
||||
@@ -56,6 +56,7 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/netbox-community/netbox/releas
|
||||
curl -fsSL "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
$STD unzip "v${RELEASE}.zip"
|
||||
mv /opt/netbox-"${RELEASE}"/ /opt/netbox
|
||||
mkdir -p /opt/netbox/netbox/media
|
||||
|
||||
$STD adduser --system --group netbox
|
||||
chown --recursive netbox /opt/netbox/netbox/media/
|
||||
|
||||
@@ -30,11 +30,12 @@ fi
|
||||
|
||||
mkdir -p /etc/pulse
|
||||
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
|
||||
ln -sf /opt/pulse/bin/pulse /usr/local/bin/pulse
|
||||
chown -R pulse:pulse /etc/pulse /opt/pulse
|
||||
msg_ok "Installed Pulse"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/pulse-backend.service
|
||||
cat <<EOF >/etc/systemd/system/pulse.service
|
||||
[Unit]
|
||||
Description=Pulse Monitoring Server
|
||||
After=network.target
|
||||
@@ -55,7 +56,7 @@ Environment="PULSE_DATA_DIR=/etc/pulse"
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now pulse-backend
|
||||
systemctl enable -q --now pulse
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
||||
@@ -21,7 +21,7 @@ fetch_and_deploy_gh_release "recyclarr" "recyclarr/recyclarr" "prebuild" "latest
|
||||
|
||||
msg_info "Configuring Recyclarr"
|
||||
mkdir -p /root/.config/recyclarr
|
||||
recyclarr config create
|
||||
$STD recyclarr config create
|
||||
msg_ok "Configured Recyclarr"
|
||||
|
||||
motd_ssh
|
||||
|
||||
35
install/resiliosync-install.sh
Normal file
35
install/resiliosync-install.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: David Bennett (dbinit)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.resilio.com/sync
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setting up Resilio Sync Repository"
|
||||
curl -fsSL "https://linux-packages.resilio.com/resilio-sync/key.asc" >/etc/apt/trusted.gpg.d/resilio-sync.asc
|
||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/resilio-sync.asc] http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" >/etc/apt/sources.list.d/resilio-sync.list
|
||||
$STD apt-get update
|
||||
msg_ok "Resilio Sync Repository Setup"
|
||||
|
||||
msg_info "Installing Resilio Sync"
|
||||
$STD apt-get install -y resilio-sync
|
||||
sed -i "s/127.0.0.1:8888/0.0.0.0:8888/g" /etc/resilio-sync/config.json
|
||||
systemctl enable -q resilio-sync
|
||||
systemctl restart resilio-sync
|
||||
msg_ok "Installed Resilio Sync"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -18,18 +18,6 @@ fetch_and_deploy_gh_release "rustdesk-hbbs" "rustdesk/rustdesk-server" "binary"
|
||||
fetch_and_deploy_gh_release "rustdesk-utils" "rustdesk/rustdesk-server" "binary" "latest" "/opt/rustdesk" "rustdesk-server-utils*amd64.deb"
|
||||
fetch_and_deploy_gh_release "rustdesk-api" "lejianwen/rustdesk-api" "binary" "latest" "/opt/rustdesk" "rustdesk-api-server*amd64.deb"
|
||||
|
||||
msg_info "Configuring RustDesk Server"
|
||||
ADMINPASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
cd /var/lib/rustdesk-api
|
||||
$STD rustdesk-api reset-admin-pwd $ADMINPASS
|
||||
{
|
||||
echo "RustDesk WebUI"
|
||||
echo ""
|
||||
echo "Username: admin"
|
||||
echo "Password: $ADMINPASS"
|
||||
} >>~/rustdesk.creds
|
||||
msg_ok "Configured RustDesk Server"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ msg_info "Creating Python virtual environment"
|
||||
sudo -H -u searxng bash -c '
|
||||
python3 -m venv /usr/local/searxng/searx-pyenv &&
|
||||
. /usr/local/searxng/searx-pyenv/bin/activate &&
|
||||
pip install -U pip setuptools wheel pyyaml &&
|
||||
pip install -U pip setuptools wheel pyyaml lxml &&
|
||||
pip install --use-pep517 --no-build-isolation -e /usr/local/searxng/searxng-src
|
||||
'
|
||||
msg_ok "Python environment ready"
|
||||
|
||||
@@ -62,6 +62,7 @@ server {
|
||||
listen 80;
|
||||
root /opt/snipe-it/public;
|
||||
server_name $IPADDRESS;
|
||||
client_max_body_size 100M;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
|
||||
@@ -19,8 +19,8 @@ $STD apt-get install -y \
|
||||
yq
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
fetch_and_deploy_gh_release "tududi" "chrisvel/tududi"
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" "tarball" "latest" "/opt/tududi"
|
||||
|
||||
msg_info "Configuring Tududi"
|
||||
cd /opt/tududi
|
||||
@@ -37,15 +37,16 @@ DB_LOCATION="/opt/tududi-db"
|
||||
UPLOAD_DIR="/opt/tududi-uploads"
|
||||
mkdir -p {"$DB_LOCATION","$UPLOAD_DIR"}
|
||||
SECRET="$(openssl rand -hex 64)"
|
||||
sed -e 's/^GOOGLE/# &/' \
|
||||
-e '/TUDUDI_SESSION/s/^# //' \
|
||||
-e '/NODE_ENV/s/^# //' \
|
||||
-e "s/your_session_secret_here/$SECRET/" \
|
||||
-e 's/development/production/' \
|
||||
-e "\$a\DB_FILE=$DB_LOCATION/production.sqlite3" \
|
||||
-e "\$a\TUDUDI_UPLOAD_PATH=$UPLOAD_DIR" \
|
||||
/opt/tududi/backend/.env.example >/opt/tududi/backend/.env
|
||||
export DB_FILE="$DB_LOCATION/production.sqlite3"
|
||||
cat <<EOF >/opt/tududi/backend/.env
|
||||
TUDUDI_SESSION_SECRET=${SECRET}
|
||||
TUDUDI_ALLOWED_ORIGINS=<your tududi IP or FQDN>
|
||||
NODE_ENV=production
|
||||
DB_FILE=${DB_LOCATION}/production.sqlite3
|
||||
TUDUDI_UPLOAD_PATH=${UPLOAD_DIR}
|
||||
DISABLE_TELEGRAM=true
|
||||
DIABLE_SCHEDULER=false
|
||||
EOF
|
||||
export DB_FILE="${DB_LOCATION}/production.sqlite3"
|
||||
$STD npm run db:init
|
||||
msg_ok "Created env and database"
|
||||
|
||||
@@ -57,9 +58,9 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/tududi
|
||||
WorkingDirectory=/opt/tududi/backend
|
||||
EnvironmentFile=/opt/tududi/backend/.env
|
||||
ExecStart=/usr/bin/npm run start
|
||||
ExecStart=/usr/bin/bash /opt/tududi/backend/cmd/start.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -13,6 +13,10 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing WireGuard"
|
||||
$STD apt-get install -y wireguard wireguard-tools net-tools iptables
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -y iptables-persistent &>/dev/null
|
||||
@@ -21,7 +25,7 @@ msg_ok "Installed WireGuard"
|
||||
|
||||
read -r -p "${TAB3}Would you like to add WGDashboard? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
fetch_and_deploy_gh_release "wgdashboard" "donaldzou/WGDashboard" "tarball" "latest" "/etc/wgdashboard"
|
||||
git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard
|
||||
|
||||
msg_info "Installing WGDashboard"
|
||||
cd /etc/wgdashboard/src
|
||||
|
||||
@@ -23,12 +23,13 @@ fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
|
||||
|
||||
msg_info "Configure ${APPLICATION}"
|
||||
cd /opt/wizarr
|
||||
/usr/local/bin/uv -q sync --locked
|
||||
$STD /usr/local/bin/uv -q run pybabel compile -d app/translations
|
||||
$STD /usr/local/bin/uv lock
|
||||
$STD /usr/local/bin/uv sync --locked
|
||||
$STD /usr/local/bin/uv run pybabel compile -d app/translations
|
||||
$STD npm --prefix app/static install
|
||||
$STD npm --prefix app/static run build:css
|
||||
mkdir -p ./.cache
|
||||
$STD /usr/local/bin/uv -q run flask db upgrade
|
||||
$STD /usr/local/bin/uv run flask db upgrade
|
||||
msg_ok "Configure ${APPLICATION}"
|
||||
|
||||
msg_info "Creating env, start script and service"
|
||||
|
||||
@@ -26,7 +26,7 @@ elif command -v wget >/dev/null 2>&1; then
|
||||
fi
|
||||
# This function enables error handling in the script by setting options and defining a trap for the ERR signal.
|
||||
catch_errors() {
|
||||
set -Eeuo pipefail
|
||||
set -Eeo pipefail
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
}
|
||||
|
||||
@@ -200,41 +200,32 @@ ssh_check() {
|
||||
|
||||
base_settings() {
|
||||
# Default Settings
|
||||
CT_TYPE="1"
|
||||
DISK_SIZE="4"
|
||||
CORE_COUNT="1"
|
||||
RAM_SIZE="1024"
|
||||
VERBOSE="${1:-no}"
|
||||
PW=""
|
||||
CT_ID=$NEXTID
|
||||
HN=$NSAPP
|
||||
BRG="vmbr0"
|
||||
NET="dhcp"
|
||||
IPV6_METHOD="none"
|
||||
IPV6_STATIC=""
|
||||
GATE=""
|
||||
APT_CACHER=""
|
||||
APT_CACHER_IP=""
|
||||
MTU=""
|
||||
SD=""
|
||||
NS=""
|
||||
MAC=""
|
||||
VLAN=""
|
||||
SSH="no"
|
||||
SSH_AUTHORIZED_KEY=""
|
||||
TAGS="community-script;"
|
||||
ENABLE_FUSE="${1:-no}"
|
||||
ENABLE_TUN="${1:-no}"
|
||||
|
||||
# Override default settings with variables from ct script
|
||||
CT_TYPE=${var_unprivileged:-$CT_TYPE}
|
||||
DISK_SIZE=${var_disk:-$DISK_SIZE}
|
||||
CORE_COUNT=${var_cpu:-$CORE_COUNT}
|
||||
RAM_SIZE=${var_ram:-$RAM_SIZE}
|
||||
VERB=${var_verbose:-$VERBOSE}
|
||||
TAGS="${TAGS}${var_tags:-}"
|
||||
ENABLE_FUSE="${var_fuse:-$ENABLE_FUSE}"
|
||||
ENABLE_TUN="${var_tun:-$ENABLE_TUN}"
|
||||
CT_TYPE=${var_unprivileged:-"1"}
|
||||
DISK_SIZE=${var_disk:-"4"}
|
||||
CORE_COUNT=${var_cpu:-"1"}
|
||||
RAM_SIZE=${var_ram:-"1024"}
|
||||
VERBOSE=${var_verbose:-"${1:-no}"}
|
||||
PW=${var_pw:-""}
|
||||
CT_ID=${var_ctid:-$NEXTID}
|
||||
HN=${var_hostname:-$NSAPP}
|
||||
BRG=${var_brg:-"vmbr0"}
|
||||
NET=${var_net:-"dhcp"}
|
||||
IPV6_METHOD=${var_ipv6_method:-"none"}
|
||||
IPV6_STATIC=${var_ipv6_static:-""}
|
||||
GATE=${var_gateway:-""}
|
||||
APT_CACHER=${var_apt_cacher:-""}
|
||||
APT_CACHER_IP=${var_apt_cacher_ip:-""}
|
||||
MTU=${var_mtu:-""}
|
||||
SD=${var_storage:-""}
|
||||
NS=${var_ns:-""}
|
||||
MAC=${var_mac:-""}
|
||||
VLAN=${var_vlan:-""}
|
||||
SSH=${var_ssh:-"no"}
|
||||
SSH_AUTHORIZED_KEY=${var_ssh_authorized_key:-""}
|
||||
UDHCPC_FIX=${var_udhcpc_fix:-""}
|
||||
TAGS="community-script;${var_tags:-}"
|
||||
ENABLE_FUSE=${var_fuse:-"${1:-no}"}
|
||||
ENABLE_TUN=${var_tun:-"${1:-no}"}
|
||||
|
||||
# Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts
|
||||
if [ -z "$var_os" ]; then
|
||||
@@ -244,6 +235,7 @@ base_settings() {
|
||||
var_version="12"
|
||||
fi
|
||||
}
|
||||
|
||||
write_config() {
|
||||
mkdir -p /opt/community-scripts
|
||||
# This function writes the configuration to a file.
|
||||
@@ -354,7 +346,7 @@ echo_default() {
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||
if [ "$VERB" == "yes" ]; then
|
||||
if [ "$VERBOSE" == "yes" ]; then
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
||||
fi
|
||||
echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}"
|
||||
|
||||
140
misc/tools.func
140
misc/tools.func
@@ -1944,8 +1944,9 @@ function setup_ffmpeg() {
|
||||
check_for_gh_release() {
|
||||
local app="$1"
|
||||
local source="$2"
|
||||
local pinned_version="${3:-}" # optional
|
||||
local current_file="$HOME/.${app,,}"
|
||||
local pinned_version_in="${3:-}" # optional
|
||||
local app_lc="${app,,}"
|
||||
local current_file="$HOME/.${app_lc}"
|
||||
|
||||
msg_info "Checking for update: ${app}"
|
||||
|
||||
@@ -1964,82 +1965,83 @@ check_for_gh_release() {
|
||||
}
|
||||
fi
|
||||
|
||||
# Fetch releases (newest → oldest)
|
||||
local releases
|
||||
releases=$(
|
||||
curl -fsSL --max-time 15 \
|
||||
-H 'Accept: application/vnd.github+json' \
|
||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||
"https://api.github.com/repos/${source}/releases" |
|
||||
jq -r '.[].tag_name' | sed 's/^v//'
|
||||
) || true
|
||||
|
||||
if [[ -z "$releases" ]]; then
|
||||
# Fetch releases and exclude drafts/prereleases
|
||||
local releases_json
|
||||
releases_json=$(curl -fsSL --max-time 20 \
|
||||
-H 'Accept: application/vnd.github+json' \
|
||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||
"https://api.github.com/repos/${source}/releases") || {
|
||||
msg_error "Unable to fetch releases for ${app}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Define current and latest versions
|
||||
local latest current
|
||||
latest=$(echo "$releases" | head -n1)
|
||||
current=""
|
||||
[[ -f "$current_file" ]] && current="$(<"$current_file")"
|
||||
|
||||
# Helper: get index of a version (lower = newer)
|
||||
get_index() {
|
||||
local ver="${1:-}"
|
||||
[[ -z "$ver" ]] && return 1
|
||||
nl -ba <<<"$releases" | awk -v v="$ver" '$2==v{print $1; exit}'
|
||||
}
|
||||
|
||||
# Pinning enabled
|
||||
if [[ -n "$pinned_version" ]]; then
|
||||
if ! grep -qxF "$pinned_version" <<<"$releases"; then
|
||||
msg_error "Pinned version v${pinned_version} not found upstream"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ -z "$current" ]]; then
|
||||
msg_info "${app} pinned to v${pinned_version}, no local version → install required"
|
||||
CHECK_UPDATE_RELEASE="$pinned_version"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "$current" == "$pinned_version" ]]; then
|
||||
if [[ "$pinned_version" == "$latest" ]]; then
|
||||
msg_ok "${app} pinned to v${pinned_version} (up to date)"
|
||||
else
|
||||
msg_ok "${app} pinned to v${pinned_version} (already installed, upstream v${latest})"
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
local pinned_index current_index
|
||||
pinned_index="$(get_index "$pinned_version" || true)"
|
||||
current_index="$(get_index "$current" || true)"
|
||||
|
||||
if [[ -z "$current_index" ]] || [[ "$current_index" -gt "$pinned_index" ]]; then
|
||||
msg_info "${app} pinned to v${pinned_version} (installed v${current:-none}) → update required"
|
||||
CHECK_UPDATE_RELEASE="$pinned_version"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "$current_index" -lt "$pinned_index" ]]; then
|
||||
msg_info "${app} pinned to v${pinned_version} (installed newer v${current}) → downgrade required"
|
||||
CHECK_UPDATE_RELEASE="$pinned_version"
|
||||
return 0
|
||||
fi
|
||||
|
||||
mapfile -t raw_tags < <(jq -r '.[] | select(.draft==false and .prerelease==false) | .tag_name' <<<"$releases_json")
|
||||
if ((${#raw_tags[@]} == 0)); then
|
||||
msg_error "No stable releases found for ${app}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# No pinning → compare against latest
|
||||
if [[ -z "$current" || "$current" != "$latest" ]]; then
|
||||
CHECK_UPDATE_RELEASE="$latest"
|
||||
msg_info "New release available: v${latest} (current: v${current:-none})"
|
||||
local clean_tags=()
|
||||
for t in "${raw_tags[@]}"; do
|
||||
clean_tags+=("${t#v}")
|
||||
done
|
||||
|
||||
local latest_raw="${raw_tags[0]}"
|
||||
local latest_clean="${clean_tags[0]}"
|
||||
|
||||
# current installed (stored without v)
|
||||
local current=""
|
||||
if [[ -f "$current_file" ]]; then
|
||||
current="$(<"$current_file")"
|
||||
else
|
||||
# Migration: search for any /opt/*_version.txt
|
||||
local legacy_files
|
||||
mapfile -t legacy_files < <(find /opt -maxdepth 1 -type f -name "*_version.txt" 2>/dev/null)
|
||||
if ((${#legacy_files[@]} == 1)); then
|
||||
current="$(<"${legacy_files[0]}")"
|
||||
echo "${current#v}" >"$current_file"
|
||||
rm -f "${legacy_files[0]}"
|
||||
fi
|
||||
fi
|
||||
current="${current#v}"
|
||||
|
||||
# Pinned version handling
|
||||
if [[ -n "$pinned_version_in" ]]; then
|
||||
local pin_clean="${pinned_version_in#v}"
|
||||
local match_raw=""
|
||||
for i in "${!clean_tags[@]}"; do
|
||||
if [[ "${clean_tags[$i]}" == "$pin_clean" ]]; then
|
||||
match_raw="${raw_tags[$i]}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -z "$match_raw" ]]; then
|
||||
msg_error "Pinned version ${pinned_version_in} not found upstream"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ "$current" != "$pin_clean" ]]; then
|
||||
msg_info "${app} pinned to ${pinned_version_in} (installed ${current:-none}) → update required"
|
||||
CHECK_UPDATE_RELEASE="$match_raw"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "$pin_clean" == "$latest_clean" ]]; then
|
||||
msg_ok "${app} pinned to ${pinned_version_in} (up to date)"
|
||||
else
|
||||
msg_ok "${app} pinned to ${pinned_version_in} (already installed, upstream ${latest_raw})"
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
# No pinning → use latest
|
||||
if [[ -z "$current" || "$current" != "$latest_clean" ]]; then
|
||||
CHECK_UPDATE_RELEASE="$latest_raw"
|
||||
msg_info "New release available: ${latest_raw} (current: v${current:-none})"
|
||||
return 0
|
||||
fi
|
||||
|
||||
msg_ok "${app} is up to date (v${latest})"
|
||||
msg_ok "${app} is up to date (${latest_raw})"
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -41,39 +41,37 @@ function msg_ok() {
|
||||
|
||||
function msg_error() { echo -e "${RD}✗ $1${CL}"; }
|
||||
|
||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
|
||||
pve_check() {
|
||||
if ! command -v pveversion >/dev/null 2>&1; then
|
||||
msg_error "This script can only be run on a Proxmox VE host."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local PVE_VER
|
||||
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
||||
|
||||
# Proxmox VE 8.x: allow 8.0 – 8.9
|
||||
if [[ "$PVE_VER" =~ ^9\.([0-9]+)(\.[0-9]+)?$ ]]; then
|
||||
# Check for Proxmox VE 8.x: allow 8.0–8.9
|
||||
if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
|
||||
local MINOR="${BASH_REMATCH[1]}"
|
||||
if ((MINOR != 0)); then
|
||||
msg_error "Unsupported Proxmox VE version: $PVE_VER"
|
||||
msg_error "Supported versions: 8.0 – 8.9 or 9.0.x"
|
||||
if ((MINOR < 0 || MINOR > 9)); then
|
||||
msg_error "This version of Proxmox VE is not supported."
|
||||
msg_error "Supported: Proxmox VE version 8.0 – 8.9"
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Proxmox VE 9.x: allow only 9.0
|
||||
if [[ "$PVE_VER" =~ ^9\.([0-9]+)$ ]]; then
|
||||
# Check for Proxmox VE 9.x: allow ONLY 9.0
|
||||
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
||||
local MINOR="${BASH_REMATCH[1]}"
|
||||
if ((MINOR != 0)); then
|
||||
msg_error "Unsupported Proxmox VE version: $PVE_VER"
|
||||
msg_error "Supported versions: 8.0 – 8.9 or 9.0"
|
||||
msg_error "This version of Proxmox VE is not yet supported."
|
||||
msg_error "Supported: Proxmox VE version 9.0"
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
msg_error "Unsupported Proxmox VE version: $PVE_VER"
|
||||
msg_error "Supported versions: 8.0 – 8.9 or 9.0"
|
||||
# All other unsupported versions
|
||||
msg_error "This version of Proxmox VE is not supported."
|
||||
msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -514,7 +514,42 @@ post_routines_common() {
|
||||
yes)
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
||||
msg_info "Disabling subscription nag"
|
||||
echo "DPkg::Post-Invoke { \"if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then echo 'Removing subscription nag from UI...'; sed -i '/data\.status/{s/\\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi\" };" >/etc/apt/apt.conf.d/no-nag-script
|
||||
# Create external script, this is needed because DPkg::Post-Invoke is fidly with quote interpretation
|
||||
cat >/usr/local/bin/pve-remove-nag.sh <<'EOF'
|
||||
#!/bin/sh
|
||||
WEB_JS=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
|
||||
if [ -s "$WEB_JS" ] && ! grep -q NoMoreNagging "$WEB_JS"; then
|
||||
echo "Patching Web UI nag..."
|
||||
sed -i -e "/data\.status/ s/!//" -e "/data\.status/ s/active/NoMoreNagging/" "$WEB_JS"
|
||||
fi
|
||||
|
||||
MOBILE_TPL=/usr/share/pve-yew-mobile-gui/index.html.tpl
|
||||
MARKER="<!-- MANAGED BLOCK FOR MOBILE NAG -->"
|
||||
if [ -f "$MOBILE_TPL" ] && ! grep -q "$MARKER" "$MOBILE_TPL"; then
|
||||
echo "Patching Mobile UI nag..."
|
||||
printf "%s\n" \
|
||||
"$MARKER" \
|
||||
"<script>" \
|
||||
" function watchAndRemoveDialog() {" \
|
||||
" const observer = new MutationObserver(() => {" \
|
||||
" const dialog = document.querySelector('dialog[aria-label=\"No valid subscription\"]');" \
|
||||
" if (dialog) { dialog.remove(); console.log('Removed dialog: No valid subscription'); observer.disconnect(); }" \
|
||||
" });" \
|
||||
" observer.observe(document.body, { childList: true, subtree: true });" \
|
||||
" }" \
|
||||
" setTimeout(watchAndRemoveDialog, 100);" \
|
||||
"</script>" \
|
||||
"" >> "$MOBILE_TPL"
|
||||
fi
|
||||
EOF
|
||||
|
||||
chmod 755 /usr/local/bin/pve-remove-nag.sh
|
||||
|
||||
cat >/etc/apt/apt.conf.d/no-nag-script <<'EOF'
|
||||
DPkg::Post-Invoke { "/usr/local/bin/pve-remove-nag.sh"; };
|
||||
EOF
|
||||
chmod 644 /etc/apt/apt.conf.d/no-nag-script
|
||||
|
||||
msg_ok "Disabled subscription nag (Delete browser cache)"
|
||||
;;
|
||||
no)
|
||||
|
||||
153
vm/haos-vm.sh
153
vm/haos-vm.sh
@@ -208,11 +208,11 @@ function exit-script() {
|
||||
function default_settings() {
|
||||
BRANCH="$stable"
|
||||
VMID=$(get_valid_nextid)
|
||||
FORMAT=",efitype=4m"
|
||||
MACHINE=""
|
||||
DISK_CACHE="cache=writethrough,"
|
||||
HN="haos$stable"
|
||||
CPU_TYPE=" -cpu host"
|
||||
MACHINE="q35"
|
||||
FORMAT=""
|
||||
DISK_SIZE="32G"
|
||||
HN="haos-${BRANCH}"
|
||||
CPU_TYPE=""
|
||||
CORE_COUNT="2"
|
||||
RAM_SIZE="4096"
|
||||
BRG="vmbr0"
|
||||
@@ -222,9 +222,8 @@ function default_settings() {
|
||||
START_VM="yes"
|
||||
METHOD="default"
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}q35${CL}"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}${HN}${CL}"
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||
@@ -268,16 +267,16 @@ function advanced_settings() {
|
||||
fi
|
||||
done
|
||||
|
||||
if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
|
||||
"i440fx" "Machine i440fx" ON \
|
||||
"q35" "Machine q35" OFF \
|
||||
if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Machine Type" 10 58 2 \
|
||||
"q35" "Modern (PCIe, UEFI, default)" ON \
|
||||
"i440fx" "Legacy (older compatibility)" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ $MACH = q35 ]; then
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||
if [ "$MACH" = "q35" ]; then
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}q35${CL}"
|
||||
FORMAT=""
|
||||
MACHINE=" -machine q35"
|
||||
else
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
|
||||
FORMAT=",efitype=4m"
|
||||
MACHINE=""
|
||||
fi
|
||||
@@ -327,17 +326,20 @@ function advanced_settings() {
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
||||
"0" "KVM64" OFF \
|
||||
"1" "Host (Default)" ON \
|
||||
if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose CPU Model" --cancel-button Exit-Script 10 58 2 \
|
||||
"KVM64" "Default – safe for migration/compatibility" ON \
|
||||
"Host" "Use host CPU features (faster, no migration)" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ $CPU_TYPE1 = "1" ]; then
|
||||
case "$CPU_TYPE1" in
|
||||
Host)
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}Host${CL}"
|
||||
CPU_TYPE=" -cpu host"
|
||||
else
|
||||
;;
|
||||
*)
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||
CPU_TYPE=""
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
@@ -484,51 +486,70 @@ msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
|
||||
var_version="${BRANCH}"
|
||||
msg_info "Retrieving the URL for Home Assistant ${BRANCH} Disk Image"
|
||||
if [ "$BRANCH" == "$dev" ]; then
|
||||
URL=https://os-artifacts.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz
|
||||
URL="https://os-artifacts.home-assistant.io/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz"
|
||||
else
|
||||
URL=https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz
|
||||
URL="https://github.com/home-assistant/operating-system/releases/download/${BRANCH}/haos_ova-${BRANCH}.qcow2.xz"
|
||||
fi
|
||||
sleep 2
|
||||
|
||||
CACHE_DIR="/var/lib/vz/template/cache"
|
||||
CACHE_FILE="$CACHE_DIR/$(basename "$URL")"
|
||||
FILE_IMG="/var/lib/vz/template/tmp/${CACHE_FILE##*/%.xz}" # .qcow2
|
||||
|
||||
mkdir -p "$CACHE_DIR" "$(dirname "$FILE_IMG")"
|
||||
msg_ok "${CL}${BL}${URL}${CL}"
|
||||
curl -f#SL -o "$(basename "$URL")" "$URL"
|
||||
echo -en "\e[1A\e[0K"
|
||||
FILE=$(basename $URL)
|
||||
msg_ok "Downloaded ${CL}${BL}haos_ova-${BRANCH}.qcow2.xz${CL}"
|
||||
|
||||
msg_info "Extracting KVM Disk Image"
|
||||
unxz $FILE
|
||||
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
|
||||
case $STORAGE_TYPE in
|
||||
nfs | dir)
|
||||
DISK_EXT=".raw"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format raw"
|
||||
THIN=""
|
||||
;;
|
||||
btrfs | local-zfs)
|
||||
DISK_EXT=".raw"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format raw"
|
||||
FORMAT=",efitype=4m"
|
||||
THIN=""
|
||||
;;
|
||||
esac
|
||||
for i in {0,1}; do
|
||||
disk="DISK$i"
|
||||
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
|
||||
eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
|
||||
done
|
||||
msg_ok "Extracted KVM Disk Image"
|
||||
if [[ ! -s "$CACHE_FILE" ]]; then
|
||||
curl -f#SL -o "$CACHE_FILE" "$URL"
|
||||
msg_ok "Downloaded ${CL}${BL}$(basename "$CACHE_FILE")${CL}"
|
||||
else
|
||||
msg_ok "Using cached image ${CL}${BL}$(basename "$CACHE_FILE")${CL}"
|
||||
fi
|
||||
|
||||
msg_info "Creating Homeassistant OS VM"
|
||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||
-name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
||||
qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
||||
qm set $VMID \
|
||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=32G \
|
||||
-boot order=scsi0 >/dev/null
|
||||
if ! command -v pv &>/dev/null; then
|
||||
apt-get update -qq &>/dev/null && apt-get install -y pv &>/dev/null
|
||||
fi
|
||||
|
||||
set -o pipefail
|
||||
msg_info "Creating Home Assistant OS VM shell"
|
||||
qm create "$VMID" -machine q35 -bios ovmf -agent 1 -tablet 0 -localtime 1 ${CPU_TYPE} \
|
||||
-cores "$CORE_COUNT" -memory "$RAM_SIZE" -name "$HN" -tags community-script \
|
||||
-net0 "virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU" -onboot 1 -ostype l26 -scsihw virtio-scsi-pci >/dev/null
|
||||
msg_ok "Created VM shell"
|
||||
|
||||
msg_info "Decompressing $(basename "$CACHE_FILE") to $FILE_IMG"
|
||||
xz -dc "$CACHE_FILE" | pv -N "Extracting" >"$FILE_IMG"
|
||||
msg_ok "Decompressed to $FILE_IMG"
|
||||
|
||||
msg_info "Importing disk into storage ($STORAGE)"
|
||||
if qm disk import --help >/dev/null 2>&1; then
|
||||
IMPORT_CMD=(qm disk import)
|
||||
else
|
||||
IMPORT_CMD=(qm importdisk)
|
||||
fi
|
||||
IMPORT_OUT="$("${IMPORT_CMD[@]}" "$VMID" "$FILE_IMG" "$STORAGE" --format raw 2>&1 || true)"
|
||||
DISK_REF="$(printf '%s\n' "$IMPORT_OUT" | sed -n "s/.*successfully imported disk '\([^']\+\)'.*/\1/p" | tr -d "\r\"'")"
|
||||
[[ -z "$DISK_REF" ]] && DISK_REF="$(pvesm list "$STORAGE" | awk -v id="$VMID" '$5 ~ ("vm-"id"-disk-") {print $1":"$5}' | sort | tail -n1)"
|
||||
[[ -z "$DISK_REF" ]] && {
|
||||
msg_error "Unable to determine imported disk reference."
|
||||
echo "$IMPORT_OUT"
|
||||
exit 1
|
||||
}
|
||||
msg_ok "Imported disk (${CL}${BL}${DISK_REF}${CL})"
|
||||
|
||||
rm -f "$FILE_IMG"
|
||||
|
||||
msg_info "Attaching EFI and root disk"
|
||||
qm set "$VMID" \
|
||||
--efidisk0 "${STORAGE}:0,efitype=4m" \
|
||||
--scsi0 "${DISK_REF},ssd=1,discard=on" \
|
||||
--boot order=scsi0 \
|
||||
--serial0 socket >/dev/null
|
||||
qm set "$VMID" --agent enabled=1 >/dev/null
|
||||
msg_ok "Attached EFI and root disk"
|
||||
|
||||
msg_info "Resizing disk to $DISK_SIZE"
|
||||
qm resize "$VMID" scsi0 "${DISK_SIZE}" >/dev/null
|
||||
msg_ok "Resized disk"
|
||||
|
||||
DESCRIPTION=$(
|
||||
cat <<EOF
|
||||
@@ -560,17 +581,17 @@ DESCRIPTION=$(
|
||||
</div>
|
||||
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_ok "Created Homeassistant OS VM ${CL}${BL}(${HN})"
|
||||
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Image Cache" \
|
||||
--yesno "Keep downloaded Home Assistant OS image for future VMs?\n\nFile: $CACHE_FILE" 10 70; then
|
||||
msg_ok "Keeping cached image"
|
||||
else
|
||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||
rm -f "$CACHE_FILE"
|
||||
msg_ok "Deleted cached image"
|
||||
fi
|
||||
|
||||
msg_ok "Created Homeassistant OS VM ${CL}${BL}(${HN})"
|
||||
if [ "$START_VM" == "yes" ]; then
|
||||
msg_info "Starting Home Assistant OS VM"
|
||||
qm start $VMID
|
||||
|
||||
@@ -203,10 +203,9 @@ function exit-script() {
|
||||
|
||||
function default_settings() {
|
||||
VMID=$(get_valid_nextid)
|
||||
FORMAT=",efitype=4m"
|
||||
MACHINE=""
|
||||
MACHINE="q35"
|
||||
FORMAT=""
|
||||
DISK_SIZE="32G"
|
||||
DISK_CACHE=""
|
||||
HN="umbrelos"
|
||||
CPU_TYPE=""
|
||||
CORE_COUNT="2"
|
||||
@@ -218,9 +217,8 @@ function default_settings() {
|
||||
START_VM="yes"
|
||||
METHOD="default"
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}q35${CL}"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}${HN}${CL}"
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||
@@ -253,16 +251,16 @@ function advanced_settings() {
|
||||
fi
|
||||
done
|
||||
|
||||
if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
|
||||
"i440fx" "Machine i440fx" ON \
|
||||
"q35" "Machine q35" OFF \
|
||||
if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Machine Type" 10 58 2 \
|
||||
"q35" "Modern (PCIe, UEFI, default)" ON \
|
||||
"i440fx" "Legacy (older compatibility)" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ $MACH = q35 ]; then
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||
if [ "$MACH" = "q35" ]; then
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}q35${CL}"
|
||||
FORMAT=""
|
||||
MACHINE=" -machine q35"
|
||||
else
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
|
||||
FORMAT=",efitype=4m"
|
||||
MACHINE=""
|
||||
fi
|
||||
@@ -312,17 +310,20 @@ function advanced_settings() {
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
||||
"0" "KVM64 (Default)" ON \
|
||||
"1" "Host" OFF \
|
||||
if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose CPU Model" --cancel-button Exit-Script 10 58 2 \
|
||||
"KVM64" "Default – safe for migration/compatibility" ON \
|
||||
"Host" "Use host CPU features (faster, no migration)" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ $CPU_TYPE1 = "1" ]; then
|
||||
case "$CPU_TYPE1" in
|
||||
"Host")
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}Host${CL}"
|
||||
CPU_TYPE=" -cpu host"
|
||||
else
|
||||
;;
|
||||
*)
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||
CPU_TYPE=""
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
@@ -433,86 +434,71 @@ pve_check
|
||||
ssh_check
|
||||
start_script
|
||||
|
||||
post_to_api_vm
|
||||
msg_info "Validating Storage"
|
||||
while read -r line; do
|
||||
TAG=$(echo $line | awk '{print $1}')
|
||||
TYPE=$(echo $line | awk '{printf "%-10s", $2}')
|
||||
FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
|
||||
ITEM=" Type: $TYPE Free: $FREE "
|
||||
OFFSET=2
|
||||
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
|
||||
MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
|
||||
fi
|
||||
STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
|
||||
done < <(pvesm status -content images | awk 'NR>1')
|
||||
VALID=$(pvesm status -content images | awk 'NR>1')
|
||||
if [ -z "$VALID" ]; then
|
||||
STORAGE_MENU=()
|
||||
while read -r tag type free; do
|
||||
ITEM="Type: $type Free: $free"
|
||||
STORAGE_MENU+=("$tag" "$ITEM" "OFF")
|
||||
done < <(pvesm status -content images | awk 'NR>1 {printf "%s %s %s\n", $1, $2, $6}')
|
||||
|
||||
if [ ${#STORAGE_MENU[@]} -eq 0 ]; then
|
||||
msg_error "Unable to detect a valid storage location."
|
||||
exit
|
||||
exit 1
|
||||
elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
||||
STORAGE=${STORAGE_MENU[0]}
|
||||
else
|
||||
while [ -z "${STORAGE:+x}" ]; do
|
||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||
"Which storage pool would you like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||
16 70 6 \
|
||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||
done
|
||||
fi
|
||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
|
||||
msg_info "Retrieving the URL for $APP"
|
||||
URL="https://download.umbrel.com/release/latest/umbrelos-amd64.img.xz"
|
||||
FILE="$(basename "$URL")"
|
||||
sleep 2
|
||||
msg_ok "${CL}${BL}${URL}${CL}"
|
||||
curl -f#SL -o "$FILE" "$URL"
|
||||
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
|
||||
|
||||
if ! command -v pv &>/dev/null; then
|
||||
apt-get update &>/dev/null && apt-get install -y pv &>/dev/null
|
||||
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
|
||||
|
||||
URL="https://download.umbrel.com/release/latest/umbrelos-amd64.img.xz"
|
||||
CACHE_DIR="/var/lib/vz/template/cache"
|
||||
CACHE_FILE="$CACHE_DIR/$(basename "$URL")"
|
||||
FILE_IMG="/var/lib/vz/template/tmp/${CACHE_FILE##*/%.xz}"
|
||||
|
||||
mkdir -p "$CACHE_DIR" "$(dirname "$FILE_IMG")"
|
||||
|
||||
if [[ ! -s "$CACHE_FILE" ]]; then
|
||||
msg_ok "Downloading Umbrel OS image"
|
||||
curl -f#SL -o "$CACHE_FILE" "$URL"
|
||||
else
|
||||
msg_ok "Using cached Umbrel OS image"
|
||||
fi
|
||||
|
||||
msg_info "Decompressing $FILE with progress${CL}\n"
|
||||
FILE_IMG="${FILE%.xz}"
|
||||
SIZE=$(xz --robot -l "$FILE" | awk -F '\t' '/^totals/ { print $5 }') &>/dev/null
|
||||
xz -dc "$FILE" | pv -s "$SIZE" -N "Extracting" >"$FILE_IMG"
|
||||
msg_ok "Decompressed to ${CL}${BL}${FILE%.xz}${CL}"
|
||||
if ! command -v pv &>/dev/null; then
|
||||
apt-get update -qq &>/dev/null && apt-get install -y pv &>/dev/null
|
||||
fi
|
||||
|
||||
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
|
||||
case $STORAGE_TYPE in
|
||||
nfs | dir)
|
||||
DISK_EXT=".raw"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format raw"
|
||||
THIN=""
|
||||
;;
|
||||
btrfs)
|
||||
DISK_EXT=".raw"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format raw"
|
||||
FORMAT=",efitype=4m"
|
||||
THIN=""
|
||||
;;
|
||||
esac
|
||||
for i in {0,1,2}; do
|
||||
disk="DISK$i"
|
||||
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
|
||||
eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
|
||||
done
|
||||
set -o pipefail
|
||||
qm create "$VMID" -machine q35 -bios ovmf -agent 1 -tablet 0 -localtime 1 ${CPU_TYPE} \
|
||||
-cores "$CORE_COUNT" -memory "$RAM_SIZE" -name "$HN" -tags community-script \
|
||||
-net0 "virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU" -onboot 1 -ostype l26 -scsihw virtio-scsi-pci >/dev/null
|
||||
|
||||
msg_info "Creating a Umbrel OS VM"
|
||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||
-name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci >/dev/null
|
||||
pvesm alloc $STORAGE $VMID $DISK0 4M >/dev/null
|
||||
qm importdisk $VMID ${FILE_IMG} $STORAGE ${DISK_IMPORT:-} >/dev/null
|
||||
qm set $VMID \
|
||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=${DISK_SIZE} \
|
||||
-boot order=scsi0 \
|
||||
-serial0 socket >/dev/null
|
||||
qm set $VMID --agent enabled=1 >/dev/null
|
||||
xz -dc "$CACHE_FILE" | pv -N "Extracting" >"$FILE_IMG"
|
||||
|
||||
if qm disk import --help >/dev/null 2>&1; then
|
||||
IMPORT_CMD=(qm disk import)
|
||||
else
|
||||
IMPORT_CMD=(qm importdisk)
|
||||
fi
|
||||
IMPORT_OUT="$("${IMPORT_CMD[@]}" "$VMID" "$FILE_IMG" "$STORAGE" --format raw 2>&1 || true)"
|
||||
DISK_REF="$(printf '%s\n' "$IMPORT_OUT" | sed -n "s/.*imported disk '\([^']\+\)'.*/\1/p" | tr -d "\r\"'")"
|
||||
[[ -z "$DISK_REF" ]] && DISK_REF="$(pvesm list "$STORAGE" | awk -v id="$VMID" '$5 ~ ("vm-"id"-disk-") {print $1":"$5}' | sort | tail -n1)"
|
||||
|
||||
qm set "$VMID" \
|
||||
--efidisk0 "${STORAGE}:0,efitype=4m" \
|
||||
--scsi0 "${DISK_REF},ssd=1,discard=on" \
|
||||
--boot order=scsi0 \
|
||||
--serial0 socket >/dev/null
|
||||
qm set "$VMID" --agent enabled=1 >/dev/null
|
||||
qm resize "$VMID" scsi0 "${DISK_SIZE}" >/dev/null
|
||||
|
||||
DESCRIPTION=$(
|
||||
cat <<EOF
|
||||
@@ -546,13 +532,14 @@ 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
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Image Cache" \
|
||||
--yesno "Keep downloaded Umbrel OS image for future VMs?\n\nFile: $CACHE_FILE" 10 70; then
|
||||
msg_ok "Keeping cached image"
|
||||
else
|
||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||
rm -f "$CACHE_FILE"
|
||||
msg_ok "Deleted cached image"
|
||||
fi
|
||||
rm -f "$FILE_IMG"
|
||||
|
||||
msg_ok "Created a Umbrel OS VM ${CL}${BL}(${HN})"
|
||||
if [ "$START_VM" == "yes" ]; then
|
||||
|
||||
Reference in New Issue
Block a user