mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-16 04:03:33 +01:00
Compare commits
8 Commits
2025-01-11
...
2025-01-13
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f620240a8 | |||
| 07c9dc4d0a | |||
| 8caf5e59b3 | |||
| f8ab39e4d6 | |||
| e47d7c4452 | |||
| ac64a9de31 | |||
| 737625024e | |||
| 6958021528 |
44
.github/workflows/shellcheck.yml
vendored
44
.github/workflows/shellcheck.yml
vendored
@ -18,15 +18,45 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changes
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v45
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
**.sh
|
||||||
|
|
||||||
|
# This is a manual copy from https://github.com/ludeeus/action-shellcheck/blob/00b27aa7cb85167568cb48a3838b75f4265f2bca/action.yaml#L59
|
||||||
|
# Why? Because the action is not capable of adding ONLY a list of files.
|
||||||
|
# We aim to only check the files that have changed.
|
||||||
|
# This is used as we deal with a codebase that throws a lot of warnings.
|
||||||
|
# Checking only the changed files is a good compromise to improve the codebase over time.
|
||||||
|
- name: Download shellcheck
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
INPUT_VERSION: "v0.10.0"
|
||||||
run: |
|
run: |
|
||||||
if ${{ github.event_name == 'pull_request' }}; then
|
if [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||||
echo "files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
|
osvariant="darwin"
|
||||||
else
|
else
|
||||||
echo "files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
|
osvariant="linux"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Run ShellCheck
|
baseurl="https://github.com/koalaman/shellcheck/releases/download"
|
||||||
if: steps.changes.outputs.files != ''
|
|
||||||
|
curl -Lso "${{ github.action_path }}/sc.tar.xz" \
|
||||||
|
"${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz"
|
||||||
|
|
||||||
|
tar -xf "${{ github.action_path }}/sc.tar.xz" -C "${{ github.action_path }}"
|
||||||
|
mv "${{ github.action_path }}/shellcheck-${INPUT_VERSION}/shellcheck" \
|
||||||
|
"${{ github.action_path }}/shellcheck"
|
||||||
|
|
||||||
|
- name: Display shellcheck version
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "${{ steps.changes.outputs.files }}" | xargs shellcheck
|
"${{ github.action_path }}/shellcheck" --version
|
||||||
|
|
||||||
|
- name: Run ShellCheck
|
||||||
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
|
env:
|
||||||
|
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
run: |
|
||||||
|
echo "${ALL_CHANGED_FILES}" | xargs shellcheck
|
||||||
|
|||||||
25
CHANGELOG.md
25
CHANGELOG.md
@ -16,6 +16,31 @@ All LXC instances created using this repository come pre-installed with Midnight
|
|||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
||||||
|
|
||||||
|
## 2025-01-13
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 💥 Breaking Changes
|
||||||
|
|
||||||
|
- Update Hoarder: Improvement .env location (see PR comment for little migration) [@MahrWe](https://github.com/MahrWe) ([#1325](https://github.com/community-scripts/ProxmoxVE/pull/1325))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Fix: tandoor.sh: Call version.py to write current version [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1454](https://github.com/community-scripts/ProxmoxVE/pull/1454))
|
||||||
|
- Fix inexistent folder on actualbudget update script [@dosten](https://github.com/dosten) ([#1444](https://github.com/community-scripts/ProxmoxVE/pull/1444))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Update kavita.json: Add info on how to enable folder adding. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1447](https://github.com/community-scripts/ProxmoxVE/pull/1447))
|
||||||
|
|
||||||
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- GitHub Actions: Fix Shellsheck workflow to only run on changes `*.sh` files [@andygrunwald](https://github.com/andygrunwald) ([#1423](https://github.com/community-scripts/ProxmoxVE/pull/1423))
|
||||||
|
|
||||||
|
### ❔ Unlabelled
|
||||||
|
|
||||||
|
- feat: allow adding SSH authorized key for root (advanced settings) by @dsiebel [@MickLesk](https://github.com/MickLesk) ([#1456](https://github.com/community-scripts/ProxmoxVE/pull/1456))
|
||||||
|
|
||||||
## 2025-01-11
|
## 2025-01-11
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@ -45,6 +45,7 @@ function update_script() {
|
|||||||
cd "${TEMPD}"
|
cd "${TEMPD}"
|
||||||
wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O - | tar -xz
|
wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O - | tar -xz
|
||||||
mv /opt/actualbudget /opt/actualbudget_bak
|
mv /opt/actualbudget /opt/actualbudget_bak
|
||||||
|
mkdir -p /opt/actualbudget/
|
||||||
mv actualbudget-actual-server-*/* /opt/actualbudget/
|
mv actualbudget-actual-server-*/* /opt/actualbudget/
|
||||||
mv /opt/actualbudget_bak/.env /opt/actualbudget
|
mv /opt/actualbudget_bak/.env /opt/actualbudget
|
||||||
mv /opt/actualbudget_bak/server-files /opt/actualbudget/server-files
|
mv /opt/actualbudget_bak/server-files /opt/actualbudget/server-files
|
||||||
|
|||||||
@ -40,7 +40,10 @@ function update_script() {
|
|||||||
msg_ok "Stopped Services"
|
msg_ok "Stopped Services"
|
||||||
msg_info "Updating ${APP} to v${RELEASE}"
|
msg_info "Updating ${APP} to v${RELEASE}"
|
||||||
cd /opt
|
cd /opt
|
||||||
mv /opt/hoarder/.env /opt/.env
|
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
|
||||||
|
mkdir -p /etc/hoarder
|
||||||
|
mv /opt/hoarder/.env /etc/hoarder/hoarder.env
|
||||||
|
fi
|
||||||
rm -rf /opt/hoarder
|
rm -rf /opt/hoarder
|
||||||
wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip"
|
wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip"
|
||||||
unzip -q v${RELEASE}.zip
|
unzip -q v${RELEASE}.zip
|
||||||
@ -54,8 +57,7 @@ function update_script() {
|
|||||||
export DATA_DIR=/opt/hoarder_data
|
export DATA_DIR=/opt/hoarder_data
|
||||||
cd /opt/hoarder/packages/db
|
cd /opt/hoarder/packages/db
|
||||||
pnpm migrate &>/dev/null
|
pnpm migrate &>/dev/null
|
||||||
mv /opt/.env /opt/hoarder/.env
|
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
|
||||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env
|
|
||||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
|
|||||||
@ -45,6 +45,8 @@ function update_script() {
|
|||||||
cd /opt/tandoor/vue
|
cd /opt/tandoor/vue
|
||||||
yarn install >/dev/null 2>&1
|
yarn install >/dev/null 2>&1
|
||||||
yarn build >/dev/null 2>&1
|
yarn build >/dev/null 2>&1
|
||||||
|
cd /opt/tandoor
|
||||||
|
python3 version.py &>/dev/null
|
||||||
systemctl restart gunicorn_tandoor
|
systemctl restart gunicorn_tandoor
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated ${APP}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -78,7 +78,8 @@ $STD pnpm install --frozen-lockfile
|
|||||||
|
|
||||||
export DATA_DIR=/opt/hoarder_data
|
export DATA_DIR=/opt/hoarder_data
|
||||||
HOARDER_SECRET=$(openssl rand -base64 36 | cut -c1-24)
|
HOARDER_SECRET=$(openssl rand -base64 36 | cut -c1-24)
|
||||||
cat <<EOF >/opt/hoarder/.env
|
mkdir -p /etc/hoarder
|
||||||
|
cat <<EOF >/etc/hoarder/hoarder.env
|
||||||
SERVER_VERSION=$RELEASE
|
SERVER_VERSION=$RELEASE
|
||||||
NEXTAUTH_SECRET="$HOARDER_SECRET"
|
NEXTAUTH_SECRET="$HOARDER_SECRET"
|
||||||
NEXTAUTH_URL="http://localhost:3000"
|
NEXTAUTH_URL="http://localhost:3000"
|
||||||
@ -129,7 +130,7 @@ After=network.target hoarder-workers.service
|
|||||||
[Service]
|
[Service]
|
||||||
ExecStart=pnpm start
|
ExecStart=pnpm start
|
||||||
WorkingDirectory=/opt/hoarder/apps/web
|
WorkingDirectory=/opt/hoarder/apps/web
|
||||||
EnvironmentFile=/opt/hoarder/.env
|
EnvironmentFile=/etc/hoarder/hoarder.env
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
@ -159,7 +160,7 @@ After=network.target hoarder-browser.service meilisearch.service
|
|||||||
[Service]
|
[Service]
|
||||||
ExecStart=pnpm start:prod
|
ExecStart=pnpm start:prod
|
||||||
WorkingDirectory=/opt/hoarder/apps/workers
|
WorkingDirectory=/opt/hoarder/apps/workers
|
||||||
EnvironmentFile=/opt/hoarder/.env
|
EnvironmentFile=/etc/hoarder/hoarder.env
|
||||||
Restart=always
|
Restart=always
|
||||||
TimeoutStopSec=5
|
TimeoutStopSec=5
|
||||||
|
|
||||||
|
|||||||
@ -30,5 +30,9 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [{
|
||||||
|
"text": "To enable folder adding append your lxc.conf on your host with 'lxc.environment: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1'",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@ -283,6 +283,7 @@ base_settings() {
|
|||||||
MAC=""
|
MAC=""
|
||||||
VLAN=""
|
VLAN=""
|
||||||
SSH="no"
|
SSH="no"
|
||||||
|
SSH_AUTHORIZED_KEY=""
|
||||||
TAGS="community-script;"
|
TAGS="community-script;"
|
||||||
|
|
||||||
# Override default settings with variables from ct script
|
# Override default settings with variables from ct script
|
||||||
@ -314,9 +315,9 @@ echo_default() {
|
|||||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}"
|
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 "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}"
|
||||||
if [ "$VERB" == "yes" ]; then
|
if [ "$VERB" == "yes" ]; then
|
||||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
||||||
@ -463,13 +464,13 @@ advanced_settings() {
|
|||||||
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then
|
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$DISK_SIZE" ]; then
|
if [ -z "$DISK_SIZE" ]; then
|
||||||
DISK_SIZE="$var_disk"
|
DISK_SIZE="$var_disk"
|
||||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||||
else
|
else
|
||||||
if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
|
if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
|
||||||
echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}"
|
echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}"
|
||||||
advanced_settings
|
advanced_settings
|
||||||
fi
|
fi
|
||||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit_script
|
exit_script
|
||||||
@ -489,9 +490,9 @@ advanced_settings() {
|
|||||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$RAM_SIZE" ]; then
|
if [ -z "$RAM_SIZE" ]; then
|
||||||
RAM_SIZE="$var_ram"
|
RAM_SIZE="$var_ram"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit_script
|
exit_script
|
||||||
@ -649,6 +650,15 @@ advanced_settings() {
|
|||||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${SSH}" == "yes" ]]; then
|
||||||
|
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)"
|
||||||
|
|
||||||
|
if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||||
|
echo "Warning: No SSH key provided."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
SSH_AUTHORIZED_KEY=""
|
||||||
|
fi
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||||
VERB="yes"
|
VERB="yes"
|
||||||
else
|
else
|
||||||
@ -703,7 +713,7 @@ install_script() {
|
|||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
header_info
|
header_info
|
||||||
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}${BL}Verbose)${CL}"
|
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}"
|
||||||
VERB="yes"
|
VERB="yes"
|
||||||
base_settings "$VERB"
|
base_settings "$VERB"
|
||||||
echo_default
|
echo_default
|
||||||
|
|||||||
Reference in New Issue
Block a user