diff -Nur smeserver-awstats-1.4.old/createlinks smeserver-awstats-1.4/createlinks --- smeserver-awstats-1.4.old/createlinks 2007-04-06 00:59:44.000000000 -0400 +++ smeserver-awstats-1.4/createlinks 2021-02-22 15:26:36.940000000 -0500 @@ -3,15 +3,29 @@ use esmith::Build::CreateLinks qw(:all); use File::Basename; use File::Path; - -panel_link("awstats", 'manager'); - -event_link("conf-awstats", 'console-save', "60"); -event_link("conf-awstats", 'remoteaccess-update', "85"); -event_link("awstats-run", "ip-change", "60"); -event_link("conf-awstats", "ip-change", "61"); +my $event; -event_link("conf-awstats", "awstats-update", "10"); +panel_link("awstats", 'manager'); + +$event="console-save"; +templates2events("/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf", $event ); + +$event="remoteaccess-update"; +templates2events("/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf", $event ); + +$event="ip-change"; +templates2events("/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf", $event ); +event_link("awstats-run", $event , "04"); + +$event="awstats-update"; +event_link("navigation-conf", $event, "50"); +templates2events("/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf", $event ); event_link("awstats-run", "awstats-update", "20"); + +$event= "smeserver-awstats-update"; +event_link("navigation-conf", $event, "50"); +templates2events("/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf", $event ); +templates2events("/etc/crontab", $event ); +event_link("awstats-upgrade", $event, "02"); diff -Nur smeserver-awstats-1.4.old/root/etc/e-smith/db/configuration/defaults/AWStats/status smeserver-awstats-1.4/root/etc/e-smith/db/configuration/defaults/AWStats/status --- smeserver-awstats-1.4.old/root/etc/e-smith/db/configuration/defaults/AWStats/status 1969-12-31 19:00:00.000000000 -0500 +++ smeserver-awstats-1.4/root/etc/e-smith/db/configuration/defaults/AWStats/status 2021-02-22 14:38:52.409000000 -0500 @@ -0,0 +1 @@ +enabled diff -Nur smeserver-awstats-1.4.old/root/etc/e-smith/db/configuration/defaults/AWStats/type smeserver-awstats-1.4/root/etc/e-smith/db/configuration/defaults/AWStats/type --- smeserver-awstats-1.4.old/root/etc/e-smith/db/configuration/defaults/AWStats/type 1969-12-31 19:00:00.000000000 -0500 +++ smeserver-awstats-1.4/root/etc/e-smith/db/configuration/defaults/AWStats/type 2021-02-22 14:38:40.451000000 -0500 @@ -0,0 +1 @@ +status diff -Nur smeserver-awstats-1.4.old/root/etc/e-smith/events/actions/awstats-upgrade smeserver-awstats-1.4/root/etc/e-smith/events/actions/awstats-upgrade --- smeserver-awstats-1.4.old/root/etc/e-smith/events/actions/awstats-upgrade 2018-07-18 10:30:22.000000000 -0400 +++ smeserver-awstats-1.4/root/etc/e-smith/events/actions/awstats-upgrade 2021-02-22 15:41:43.860000000 -0500 @@ -1,10 +1,19 @@ #!/bin/bash -cp -a /var/www/awstats/icon/* /etc/e-smith/web/panels/manager/html/awstats/icon -cp -a /var/www/awstats/awstats.pl /etc/e-smith/web/panels/manager/cgi-bin/.awstats -cp -a /var/www/awstats/lang /etc/e-smith/web/panels/manager/cgi-bin/.awstats -cp -a /var/www/awstats/lib /etc/e-smith/web/panels/manager/cgi-bin/.awstats -cp -a /var/www/awstats/plugins /etc/e-smith/web/panels/manager/cgi-bin/.awstats +if [[ -d /var/www/awstats/ ]]; then + cp -a /var/www/awstats/icon/* /etc/e-smith/web/panels/manager/html/awstats/icon + cp -a /var/www/awstats/awstats.pl /etc/e-smith/web/panels/manager/cgi-bin/.awstats + cp -a /var/www/awstats/lang /etc/e-smith/web/panels/manager/cgi-bin/.awstats + cp -a /var/www/awstats/lib /etc/e-smith/web/panels/manager/cgi-bin/.awstats + cp -a /var/www/awstats/plugins /etc/e-smith/web/panels/manager/cgi-bin/.awstats +else + rootdir='/usr/share/awstats/' + cp -a $rootdir/wwwroot/icon/* /etc/e-smith/web/panels/manager/html/awstats/icon + cp -a $rootdir/wwwroot/cgi-bin/awstats.pl /etc/e-smith/web/panels/manager/cgi-bin/.awstats + cp -a $rootdir/lang /etc/e-smith/web/panels/manager/cgi-bin/.awstats + cp -a $rootdir/lib /etc/e-smith/web/panels/manager/cgi-bin/.awstats + cp -a $rootdir/plugins /etc/e-smith/web/panels/manager/cgi-bin/.awstats +fi chmod -R 770 /etc/e-smith/web/panels/manager/cgi-bin/.awstats #cd /etc/e-smith/web/panels/manager/html/awstats/ diff -Nur smeserver-awstats-1.4.old/root/etc/e-smith/events/actions/conf-awstats smeserver-awstats-1.4/root/etc/e-smith/events/actions/conf-awstats --- smeserver-awstats-1.4.old/root/etc/e-smith/events/actions/conf-awstats 2018-07-18 10:30:23.000000000 -0400 +++ smeserver-awstats-1.4/root/etc/e-smith/events/actions/conf-awstats 1969-12-31 19:00:00.000000000 -0500 @@ -1,41 +0,0 @@ -#!/usr/bin/perl -w - -#---------------------------------------------------------------------- -# copyright (C) 2001 neddix -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#---------------------------------------------------------------------- - -package esmith; - -use strict; -use esmith::config; -use esmith::util; - -esmith::templates::processTemplate( - { - TEMPLATE_PATH => '/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf', - OUTPUT_FILENAME => "/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf", - } -); - -esmith::templates::processTemplate( - { - TEMPLATE_PATH => '/etc/crontab', - OUTPUT_FILENAME => "/etc/crontab", - } -); - -exit (0); diff -Nur smeserver-awstats-1.4.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf smeserver-awstats-1.4/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf --- smeserver-awstats-1.4.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf 2018-07-20 09:44:29.000000000 -0400 +++ smeserver-awstats-1.4/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf 2021-02-22 16:15:21.799000000 -0500 @@ -165,6 +165,7 @@ my $networkDB = esmith::ConfigDB->open('networks') or die("can't open Networks DB"); my $skipHosts = $configDB->get_prop( "AWStats", "SkipHosts" ) || ''; + my $allIPs = ""; $OUT = "SkipHosts=\""; @@ -205,6 +206,9 @@ } } + + # Escape full stops e.g. \.co\.uk ; for REGEX only + $allIPs =~ s/\./\\./g; # external IP # @@ -216,6 +220,8 @@ # If Skip ExternalIP is set to mask if ( defined $ipskipExtIP && $ipskipExtIP eq "mask" ) { my $return = mip( $externalip, $externalnetmask ); + #Escape full stops e.g. \.co\.uk ; for REGEX only + $return =~ s/\./\\./g; $allIPs .= "REGEX[^$return] "; } @@ -226,12 +232,6 @@ } } - # Always add - #$allIPs = "127.0.0.1 $allIPs"; - - # Escape full stops e.g. \.co\.uk - $allIPs =~ s/\./\\./g; - $OUT .= "127.0.0.1 $skipHosts $allIPs"; $OUT .= '"' . "\n"; @@ -242,7 +242,7 @@ my $domainsDB = esmith::ConfigDB->open('domains') or die("can't open Domains DB"); - $OUT .= 'HostAliases="localhost 127\.0\.0\.1'; + $OUT .= 'HostAliases="localhost 127.0.0.1'; # push( @aliases, $DynDnsHostname ) if defined $DynDnsHostname; # Need to find DynDnsHostname if it exists @@ -259,11 +259,11 @@ # needed for IE6 beta if ( defined $ipskipExtIP && $ipskipExtIP eq "mask" ) { $externalip = mip( $externalip, $externalnetmask ); - $externalip =~ s/\./\\./g; + #$externalip =~ s/\./\\./g; $OUT .= " " . $externalip; } elsif ( defined $ipskipExtIP && $ipskipExtIP eq "yes" ) { - $externalip =~ s/\./\\./g; + #$externalip =~ s/\./\\./g; $OUT .= " " . $externalip; } diff -Nur smeserver-awstats-1.4.old/root/etc/yum/post-actions/awstats.action smeserver-awstats-1.4/root/etc/yum/post-actions/awstats.action --- smeserver-awstats-1.4.old/root/etc/yum/post-actions/awstats.action 1969-12-31 19:00:00.000000000 -0500 +++ smeserver-awstats-1.4/root/etc/yum/post-actions/awstats.action 2021-02-22 15:02:23.606000000 -0500 @@ -0,0 +1,2 @@ +awstats:install:/etc/e-smith/events/actions/awstats-upgrade +awstats:update:/etc/e-smith/events/actions/awstats-upgrade diff -Nur smeserver-awstats-1.4.old/root/sbin/e-smith/awstats-pp smeserver-awstats-1.4/root/sbin/e-smith/awstats-pp --- smeserver-awstats-1.4.old/root/sbin/e-smith/awstats-pp 2007-04-06 00:59:44.000000000 -0400 +++ smeserver-awstats-1.4/root/sbin/e-smith/awstats-pp 2021-02-22 16:10:24.112000000 -0500 @@ -47,7 +47,7 @@ my $status=db_get_prop(\%conf, "AWStats", "status"); exit (0) if not defined $status || $status ne "enabled"; -$debug=(db_get_prop(\%conf, "AWStats", "Debug") eq "yes"); +$debug=((db_get_prop(\%conf, "AWStats", "Debug") ||"no") eq "yes"); # primitive command line options parsing foreach (@ARGV) {