Skip to content

Commit 20148d6

Browse files
committed
delete the stat generator config files only when changed
1 parent dd1507a commit 20148d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,18 +1926,18 @@ function update($event_name, $data) {
19261926
}
19271927

19281928
//* Remove the AWstats configuration file
1929-
if($data['old']['stats_type'] == 'awstats') {
1929+
if($data['old']['stats_type'] == 'awstats' && $data['new']['stats_type'] != 'awstats') {
19301930
$this->awstats_delete($data, $web_config);
19311931
}
19321932

19331933
//* Remove the GoAccess configuration file
1934-
if($data['old']['stats_type'] == 'goaccess') {
1934+
if($data['old']['stats_type'] == 'goaccess' && $data['new']['stats_type'] != 'goaccess') {
19351935
$this->goaccess_delete($data, $web_config);
19361936
}
19371937

19381938
//* Remove the Webalizer configuration file
1939-
if($data['old']['stats_type'] == 'webalizer') {
1940-
$this->webalizer_delete($data, $web_config);
1939+
if($data['old']['stats_type'] == 'webalizer' && $data['new']['stats_type'] != 'webalizer') {
1940+
$this->webalizer_delete($data, $web_config);
19411941
}
19421942

19431943
$this->php_fpm_pool_update($data, $web_config, $pool_dir, $pool_name, $socket_dir, $web_folder);

0 commit comments

Comments
 (0)