Skip to content

Commit

Permalink
tweaks to awstats install
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Field committed Jun 30, 2017
1 parent d0a435f commit 237ab29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/externals/awstats/wwwroot/cgi-bin/lang/awstats-en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ message20=Hours
message21=Browsers
message22=
message23=Referrers
message24=Never updated (See 'Build/Update' on awstats_setup.html page)
message24=Awaiting first update... can take up to 15 minutes
message25=Visitors domains/countries
message26=hosts
message27=pages
Expand Down Expand Up @@ -179,4 +179,4 @@ message174=Safari versions
message175=Chrome versions
message176=Konqueror versions
message177=,
message178=Downloads
message178=Downloads
14 changes: 12 additions & 2 deletions admin/post-update-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
# on a few platforms.
#-------------------------------------------

# XXX currently this script might restart the webserver,
# which will kill any currently installing modules
# it doesn't seem to be related to signals (tried trapping
# them) but rather the pipes in do_tasks.php that read
# rsync getting closed (or perhaps rsync getting killed?)
# so you'd have to start there in fixing that, or perhaps
# just disallow selfUpdate while items are installing
# (probably should queue the selfUpdate like a module?)

main() {

setVariables
Expand Down Expand Up @@ -157,7 +166,8 @@ installAWStats() {
crontabFile=/etc/crontab
if [[ -z `grep 'awstats upkeep' $crontabFile` ]]; then
perl -pi -e 's/ \S+ / RACHEL /' /var/log/httpd/access_log \
&& echo "# awstats upkeep\n*/10 * * * * root $awstatsDir/tools/awstats_updateall.pl now " \
&& printf "%s\n%s%s" "# awstats upkeep" \
"*/10 * * * * root $awstatsDir/tools/awstats_updateall.pl now " \
"-awstatsprog=$awstatsDir/wwwroot/cgi-bin/awstats.pl > /dev/null" >> $crontabFile &
fi
fi
Expand All @@ -167,7 +177,7 @@ installAWStats() {
# restarts the webserver if the flag to do so has been set
restartWebserver() {
if [[ $isPlus ]]; then
killall lighttpd && /usr/bin/lighttpd -f /usr/local/etc/lighttpd.conf
killall -INT lighttpd && /usr/bin/lighttpd -f /usr/local/etc/lighttpd.conf
fi
}

Expand Down

0 comments on commit 237ab29

Please sign in to comment.