Domain Monitor: Add domain checking cron (#9129)

* Add cron

* Update
This commit is contained in:
Slaviša Arežina
2025-11-13 13:30:37 +01:00
committed by GitHub
parent b0fb6bc64d
commit 7a787c58a0
2 changed files with 39 additions and 34 deletions

View File

@@ -28,6 +28,10 @@ function update_script() {
exit exit
fi fi
if ! grep -Fq "root /usr/bin/php /opt/domain-monitor/cron/check_domains.php" /etc/crontab; then
echo "0 0 * * * root /usr/bin/php /opt/domain-monitor/cron/check_domains.php" >>/etc/crontab
fi
if check_for_gh_release "domain-monitor" "Hosteroid/domain-monitor"; then if check_for_gh_release "domain-monitor" "Hosteroid/domain-monitor"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop apache2 systemctl stop apache2

View File

@@ -43,6 +43,7 @@ sed -i -e "s|^APP_ENV=.*|APP_ENV=production|" \
-e "s|^DB_USERNAME=.*|DB_USERNAME=$MARIADB_DB_USER|" \ -e "s|^DB_USERNAME=.*|DB_USERNAME=$MARIADB_DB_USER|" \
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=$MARIADB_DB_PASS|" \ -e "s|^DB_PASSWORD=.*|DB_PASSWORD=$MARIADB_DB_PASS|" \
-e "s|^DB_DATABASE=.*|DB_DATABASE=$MARIADB_DB_NAME|" .env -e "s|^DB_DATABASE=.*|DB_DATABASE=$MARIADB_DB_NAME|" .env
echo "0 0 * * * root /usr/bin/php /opt/domain-monitor/cron/check_domains.php" >>/etc/crontab
cat <<EOF >/etc/apache2/sites-enabled/000-default.conf cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80> <VirtualHost *:80>