mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-11 13:52:51 +00:00
'Add new script'
This commit is contained in:
67
ct/domain-monitor.sh
Normal file
67
ct/domain-monitor.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/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: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Hosteroid/domain-monitor
|
||||
|
||||
APP="Domain-Monitor"
|
||||
var_tags="${var_tags:-proxy}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
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/domain-monitor ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "domain-monitor" "Hosteroid/domain-monitor"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop apache2
|
||||
msg_info "Service stopped"
|
||||
|
||||
msg_info "Creating backup"
|
||||
mv /opt/domain-monitor/.env /opt
|
||||
msg_ok "Created backup"
|
||||
|
||||
setup_composer
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip"
|
||||
|
||||
msg_info "Updating Domain Monitor"
|
||||
cd /opt/domain-monitor
|
||||
$STD composer install
|
||||
msg_ok "Updated Domain Monitor"
|
||||
|
||||
msg_info "Restoring backup"
|
||||
mv /opt/.env /opt/domain-monitor
|
||||
msg_ok "Restored backup"
|
||||
|
||||
msg_info "Restarting Services"
|
||||
systemctl reload apache2
|
||||
msg_ok "Restarted Services"
|
||||
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}${CL}"
|
||||
6
ct/headers/domain-monitor
Normal file
6
ct/headers/domain-monitor
Normal file
@@ -0,0 +1,6 @@
|
||||
____ _ __ ___ _ __
|
||||
/ __ \____ ____ ___ ____ _(_)___ / |/ /___ ____ (_) /_____ _____
|
||||
/ / / / __ \/ __ `__ \/ __ `/ / __ \______/ /|_/ / __ \/ __ \/ / __/ __ \/ ___/
|
||||
/ /_/ / /_/ / / / / / / /_/ / / / / /_____/ / / / /_/ / / / / / /_/ /_/ / /
|
||||
/_____/\____/_/ /_/ /_/\__,_/_/_/ /_/ /_/ /_/\____/_/ /_/_/\__/\____/_/
|
||||
|
||||
35
frontend/public/json/domain-monitor.json
Normal file
35
frontend/public/json/domain-monitor.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Domain Monitor",
|
||||
"slug": "domain-monitor",
|
||||
"categories": [
|
||||
9
|
||||
],
|
||||
"date_created": "2025-09-04",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://github.com/Hosteroid/domain-monitor/blob/main/README.md",
|
||||
"config_path": "/opt/domain-monitor/.env",
|
||||
"website": "https://github.com/Hosteroid/domain-monitor",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/domain-monitor.png",
|
||||
"description": "A self-hosted PHP domain expiration monitoring tool that tracks domain expiry dates, RDAP/WHOIS data, and SSL certificate validity. Supports alerts, multi-user setup, and cron automation. Built for developers, hosting providers, and IT admins who want full control without third-party services.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/domain-monitor.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 512,
|
||||
"hdd": 2,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
65
install/domain-monitor-install.sh
Normal file
65
install/domain-monitor-install.sh
Normal file
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Hosteroid/domain-monitor
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y --no-install-recommends \
|
||||
libicu-dev \
|
||||
libzip-dev \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libfreetype6-dev \
|
||||
libxml2-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libonig-dev \
|
||||
pkg-config
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql" setup_php
|
||||
setup_composer
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="domain_monitor" MARIADB_DB_USER="domainmonitor" setup_mariadb_db
|
||||
fetch_and_deploy_gh_release "domain-monitor" "Hosteroid/domain-monitor" "prebuild" "latest" "/opt/domain-monitor" "domain-monitor-v*.zip"
|
||||
|
||||
msg_info "Setting up Domain Monitor"
|
||||
ENC_KEY=$(openssl rand -base64 48 | tr -dc 'A-Za-z0-9' | head -c 32)
|
||||
cd /opt/domain-monitor
|
||||
$STD composer install
|
||||
cp env.example.txt .env
|
||||
sed -i -e "s|^APP_ENV=.*|APP_ENV=production|" \
|
||||
-e "s|^APP_ENCRYPTION_KEY=.*|APP_ENCRYPTION_KEY=$ENC_KEY|" \
|
||||
-e "s|^SESSION_COOKIE_HTTPONLY=.*|SESSION_COOKIE_HTTPONLY=0|" \
|
||||
-e "s|^DB_USERNAME=.*|DB_USERNAME=$MARIADB_DB_USER|" \
|
||||
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=$MARIADB_DB_PASS|" \
|
||||
-e "s|^DB_DATABASE=.*|DB_DATABASE=$MARIADB_DB_NAME|" .env
|
||||
|
||||
cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
|
||||
<VirtualHost *:80>
|
||||
ServerName domainmonitor.local
|
||||
DocumentRoot "/opt/domain-monitor/public"
|
||||
|
||||
<Directory "/opt/domain-monitor/public">
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
EOF
|
||||
chown -R www-data:www-data /opt/domain-monitor
|
||||
$STD a2enmod rewrite headers
|
||||
$STD systemctl reload apache2
|
||||
msg_ok "Setup Domain Monitor"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user