Keeps clean VHosts dir from other files

This commit is contained in:
Tobias Herre 2023-10-24 19:19:43 +02:00
parent df58e2eeb6
commit 8b54824842
1 changed files with 29 additions and 0 deletions

View File

@ -250,6 +250,26 @@ methods:
# "apache_php_pkgs_installed" # "apache_php_pkgs_installed"
#}; #};
#
files:
"$(sys.workdir)/data/agent/apache/."
create => "true",
handle => "apache_work_dir_created";
commands:
"/bin/sh"
args => "$(sys.workdir)/inputs/$(def.wmde_libdir)/scripts/del-files-not-in-list.sh $(apache.cfg_dir)/Vhosts $(sys.workdir)/data/agent/apache/domains.txt && echo dummy.conf > $(sys.workdir)/data/agent/apache/domains.txt",
inform => "false",
contain => wmde_cmd_useshell;
# "echo"
# args => "dummy.conf > $(sys.workdir)/data/agent/apache/domains.txt",
# inform => "false",
# contain => wmde_cmd_useshell;
reports: reports:
@ -345,6 +365,15 @@ methods:
"any" usebundle => restart_apache("$(site[domain])"), "any" usebundle => restart_apache("$(site[domain])"),
depends_on => {"vhost_cfg_done$(site[domain])" }; depends_on => {"vhost_cfg_done$(site[domain])" };
commands:
"echo"
args => "$(site[domain]).conf >> $(sys.workdir)/data/agent/apache/domains.txt",
inform => "false",
depends_on => {"vhost_cfg_done$(site[domain])"},
contain => wmde_cmd_useshell;
reports: reports: