mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-08 16:59:17 +00:00
Compare commits
19 Commits
959a7b4b14
...
ab206530e0
Author | SHA1 | Date | |
---|---|---|---|
|
ab206530e0 | ||
|
f5b78d5dcc | ||
|
3f9863ebf9 | ||
|
786e8963b9 | ||
|
6cc4244f70 | ||
|
f5a260a399 | ||
|
f1f8f78420 | ||
|
6c42b5c21a | ||
|
24d24421d1 | ||
|
9e4c627323 | ||
|
2551bf6f9f | ||
|
8533380813 | ||
|
f65abd9ac8 | ||
|
85387563f0 | ||
|
5977f8f936 | ||
|
a15a59e615 | ||
|
14dfaa9bde | ||
|
75778976d0 | ||
|
c45085a51d |
4
.github/autolabeler-config.json
vendored
4
.github/autolabeler-config.json
vendored
@ -50,7 +50,7 @@
|
|||||||
"maintenance": [
|
"maintenance": [
|
||||||
{
|
{
|
||||||
"fileStatus": null,
|
"fileStatus": null,
|
||||||
"includeGlobs": ["*.md", ".github/**"],
|
"includeGlobs": ["*.md", ".github/**", "misc/*.func", "ct/create_lxc.sh"],
|
||||||
"excludeGlobs": []
|
"excludeGlobs": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -61,4 +61,4 @@
|
|||||||
"excludeGlobs": []
|
"excludeGlobs": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
96
.github/workflows/update_json_date.yml
vendored
96
.github/workflows/update_json_date.yml
vendored
@ -1,68 +1,42 @@
|
|||||||
name: Update JSON Date in PR
|
name: Update JSON Date
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
types: [opened, synchronize, reopened]
|
||||||
- main
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_json:
|
list-files:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Checkout PR Branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
- name: Configure Git user
|
- name: Update JSON
|
||||||
run: |
|
id: changed-files
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[].filename' | tr '\n' ' ')
|
||||||
|
echo "changed_files=${FILES}"
|
||||||
- name: Get list of changed files in PR
|
for FILE in $FILES; do
|
||||||
id: files
|
if [[ "$FILE" =~ /(.*)\.json ]]; then
|
||||||
uses: actions/github-script@v7
|
NAME="${BASH_REMATCH[1]}"
|
||||||
with:
|
else
|
||||||
script: |
|
echo "no new JSON in ${FILES}"
|
||||||
const prNumber = context.payload.pull_request.number;
|
continue
|
||||||
const prFiles = await github.rest.pulls.listFiles({
|
fi
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
JSON_FILE="json/${NAME}.json"
|
||||||
pull_number: prNumber,
|
if [[ -f "$JSON_FILE" ]]; then
|
||||||
});
|
echo "Updating date_created in $JSON_FILE"
|
||||||
|
jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE"
|
||||||
// Filter for JSON files only
|
else
|
||||||
const changedJsonFiles = prFiles.data
|
echo "JSON file $FILES not found"
|
||||||
.filter(file => file.filename.endsWith('.json'))
|
fi
|
||||||
.map(file => file.filename);
|
|
||||||
|
|
||||||
core.setOutput('changed_files', changedJsonFiles.join('\n'));
|
|
||||||
console.log('Changed JSON files:', changedJsonFiles);
|
|
||||||
|
|
||||||
- name: Update dates in changed JSON files
|
|
||||||
run: |
|
|
||||||
changed_files="${{ steps.files.outputs.changed_files }}"
|
|
||||||
if [[ -z "$changed_files" ]]; then
|
|
||||||
echo "No JSON files changed in this PR. Exiting."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for file in $changed_files; do
|
|
||||||
echo "Updating $file with current date."
|
|
||||||
# Your logic to update the file
|
|
||||||
jq '.date_created = "'"$(date +%Y-%m-%d)"'"' "$file" > tmp.$$.json && mv tmp.$$.json "$file"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Commit changes if updated
|
git config --global user.name "github-actions[bot]"
|
||||||
run: |
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git add *.json
|
git diff --exit-code || git commit -am "Updating Dates in affected JSON files."
|
||||||
git diff --cached --quiet || git commit -m "Update JSON dates"
|
git push
|
||||||
|
env:
|
||||||
- name: Push changes
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
git push
|
|
||||||
|
12
CHANGELOG.md
12
CHANGELOG.md
@ -16,6 +16,18 @@ 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-16
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### ✨ New Scripts
|
||||||
|
|
||||||
|
- New script: phpIPAM [@bvdberg01](https://github.com/bvdberg01) ([#1503](https://github.com/community-scripts/ProxmoxVE/pull/1503))
|
||||||
|
|
||||||
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- [core] Recreate Update JSON Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1523](https://github.com/community-scripts/ProxmoxVE/pull/1523))
|
||||||
|
|
||||||
## 2025-01-15
|
## 2025-01-15
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
72
ct/phpipam.sh
Normal file
72
ct/phpipam.sh
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#!/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: bvdberg01
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://phpipam.net/
|
||||||
|
|
||||||
|
# App Default Values
|
||||||
|
APP="phpIPAM"
|
||||||
|
var_tags="network"
|
||||||
|
var_cpu="1"
|
||||||
|
var_ram="512"
|
||||||
|
var_disk="4"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
|
||||||
|
# App Output & Base Settings
|
||||||
|
header_info "$APP"
|
||||||
|
base_settings
|
||||||
|
|
||||||
|
# Core
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
if [[ ! -d /opt/phpipam ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/phpipam/phpipam/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop apache2
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Updating ${APP} to v${RELEASE}"
|
||||||
|
cd /opt
|
||||||
|
mv /opt/phpipam/ /opt/phpipam-backup
|
||||||
|
wget -q "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip"
|
||||||
|
unzip -q "phpipam-v${RELEASE}.zip"
|
||||||
|
cp /opt/phpipam-backup/config.php /opt/phpipam
|
||||||
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start apache2
|
||||||
|
msg_ok "Started Service"
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -r "/opt/phpipam-v${RELEASE}.zip"
|
||||||
|
rm -r /opt/phpipam-backup
|
||||||
|
msg_ok "Cleaned"
|
||||||
|
msg_ok "Updated Successfully"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
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}${CL}"
|
@ -4,6 +4,8 @@ import { FaDiscord, FaGithub } from "react-icons/fa";
|
|||||||
|
|
||||||
export const basePath = process.env.BASE_PATH;
|
export const basePath = process.env.BASE_PATH;
|
||||||
|
|
||||||
|
const isMobile = typeof window !== "undefined" && window.innerWidth < 640;
|
||||||
|
|
||||||
export const navbarLinks = [
|
export const navbarLinks = [
|
||||||
{
|
{
|
||||||
href: `https://github.com/community-scripts/${basePath}`,
|
href: `https://github.com/community-scripts/${basePath}`,
|
||||||
@ -23,13 +25,15 @@ export const navbarLinks = [
|
|||||||
icon: <Scroll className="h-4 w-4" />,
|
icon: <Scroll className="h-4 w-4" />,
|
||||||
text: "Change Log",
|
text: "Change Log",
|
||||||
},
|
},
|
||||||
{
|
!isMobile
|
||||||
href: `https://github.com/community-scripts/${basePath}/discussions`,
|
? {
|
||||||
event: "Discussions",
|
href: `https://github.com/community-scripts/${basePath}/discussions`,
|
||||||
icon: <MessagesSquare className="h-4 w-4 hidden sm:block" />,
|
event: "Discussions",
|
||||||
text: "Discussions",
|
icon: <MessagesSquare className="h-4 w-4" />,
|
||||||
},
|
text: "Discussions",
|
||||||
];
|
}
|
||||||
|
: null,
|
||||||
|
].filter(Boolean) as { href: string; event: string; icon: JSX.Element; text: string }[]; // Typ-Anpassung nach filter(Boolean)
|
||||||
|
|
||||||
export const mostPopularScripts = [
|
export const mostPopularScripts = [
|
||||||
"Proxmox VE Post Install",
|
"Proxmox VE Post Install",
|
||||||
|
86
install/phpipam-install.sh
Normal file
86
install/phpipam-install.sh
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: bvdberg01
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
mc \
|
||||||
|
mariadb-server \
|
||||||
|
apache2 \
|
||||||
|
libapache2-mod-php \
|
||||||
|
php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \
|
||||||
|
php-pear
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up MariaDB"
|
||||||
|
DB_NAME=phpipam
|
||||||
|
DB_USER=phpipam
|
||||||
|
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 "phpIPAM-Credentials"
|
||||||
|
echo "phpIPAM Database User: $DB_USER"
|
||||||
|
echo "phpIPAM Database Password: $DB_PASS"
|
||||||
|
echo "phpIPAM Database Name: $DB_NAME"
|
||||||
|
} >> ~/phpipam.creds
|
||||||
|
msg_ok "Set up MariaDB"
|
||||||
|
|
||||||
|
msg_info "Installing phpIPAM"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/phpipam/phpipam/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
cd /opt
|
||||||
|
wget -q "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip"
|
||||||
|
unzip -q "phpipam-v${RELEASE}.zip"
|
||||||
|
mysql -u root "${DB_NAME}" < /opt/phpipam/db/SCHEMA.sql
|
||||||
|
cp /opt/phpipam/config.dist.php /opt/phpipam/config.php
|
||||||
|
sed -i -e "s/\(\$disable_installer = \).*/\1true;/" \
|
||||||
|
-e "s/\(\$db\['user'\] = \).*/\1'$DB_USER';/" \
|
||||||
|
-e "s/\(\$db\['pass'\] = \).*/\1'$DB_PASS';/" \
|
||||||
|
-e "s/\(\$db\['name'\] = \).*/\1'$DB_NAME';/" \
|
||||||
|
/opt/phpipam/config.php
|
||||||
|
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed phpIPAM"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/apache2/sites-available/phpipam.conf
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName phpipam
|
||||||
|
DocumentRoot /opt/phpipam
|
||||||
|
<Directory /opt/phpipam>
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/phpipam_error.log
|
||||||
|
CustomLog /var/log/apache2/phpipam_access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
EOF
|
||||||
|
$STD a2ensite phpipam
|
||||||
|
$STD a2enmod rewrite
|
||||||
|
$STD a2dissite 000-default.conf
|
||||||
|
$STD systemctl reload apache2
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf "/opt/phpipam-v${RELEASE}.zip"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
34
json/phpipam.json
Normal file
34
json/phpipam.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"name": "phpIPAM",
|
||||||
|
"slug": "phpipam",
|
||||||
|
"categories": [
|
||||||
|
11
|
||||||
|
],
|
||||||
|
"date_created": "2025-01-15",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 80,
|
||||||
|
"documentation": "https://phpipam.net/documents/all-documents/",
|
||||||
|
"website": "https://phpipam.net/",
|
||||||
|
"logo": "https://phpipam.net/css/images/phpipam_logo_small@2x.png",
|
||||||
|
"description": "phpipam is an open-source web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/phpipam.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 1,
|
||||||
|
"ram": 1024,
|
||||||
|
"hdd": 4,
|
||||||
|
"os": "debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": "Admin",
|
||||||
|
"password": "ipamadmin"
|
||||||
|
},
|
||||||
|
"notes": []
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
### Generated on 01-14-2025
|
### Generated on 01-16-2025
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
### 2fauth.sh
|
### 2fauth.sh
|
||||||
@ -1357,6 +1357,15 @@ APP=PhotoPrism
|
|||||||
/_/ /_/ /_/\____/\__/\____/_/ /_/ /_/____/_/ /_/ /_/
|
/_/ /_/ /_/\____/\__/\____/_/ /_/ /_/____/_/ /_/ /_/
|
||||||
|
|
||||||
|
|
||||||
|
### phpipam.sh
|
||||||
|
APP=phpIPAM
|
||||||
|
__ ________ ___ __ ___
|
||||||
|
____ / /_ ____ / _/ __ \/ | / |/ /
|
||||||
|
/ __ \/ __ \/ __ \ / // /_/ / /| | / /|_/ /
|
||||||
|
/ /_/ / / / / /_/ // // ____/ ___ |/ / / /
|
||||||
|
/ .___/_/ /_/ .___/___/_/ /_/ |_/_/ /_/
|
||||||
|
/_/ /_/
|
||||||
|
|
||||||
### pialert.sh
|
### pialert.sh
|
||||||
APP=PiAlert
|
APP=PiAlert
|
||||||
____ _ ___ __ __
|
____ _ ___ __ __
|
||||||
|
Loading…
Reference in New Issue
Block a user