webupd - updates the awstats statistics pages and the dig search indexes for an arbitrary number of websites on a remote server.
webupd [[ -S ] [ -c <config_file> ] [ -d ] [[ -h ]|[ -s ]] [ -v ] <host_name> ] | [ -V ]
webupd is a Bourne shell script which should work equally well on all versions of UNIX and Linux.
The webupd uses the <host_name> to look up the path to the web pages and the name of the configuration files for dig and awstats. A ssh connection is made to <host_name> and the awstats perl script awstats.pl is run to update the stats data set and generate static web pages for each web site.
The dig script rundig is then invoked to update the search data with any changes that have been made to the web pages.
-c
<config_file>
Allows a configuration file to be identified on the command line rather than
using the default "
/usr/local/etc/webupd.cf
".
-S Use static links when generating awstats web page.
-d Run in debug mode.
-h Update htdig only.
-s Update awstats only.
-v Run in verbose mode.
-V Print the version details to standard out and exit.
webupd caswallon-gw
The script will look for the configuration file in the default location i.e. /usr/local/etc/webupd.cf .
NB. The site names are abreviated in the example configuration file and appropriate alternative short path names are provided as symbolic links on disk. These sites could equally well have been written as "amharic-interpreter.com" "citylinux.com" etc. provided that the paths are available e.g. "usr/local/web/amharic-interpreter.com".
The script has very little input error checking. The script is designed to be used with cron where the resolution of the symbolic hostname is predictable. It is assumed that ssh keys have already been exchanged and that the connection will be non problematic.
Clifford W Fulford, City Linux. Contact fulford@fulford.net or call +44 (0)709 229 5385.
Copyright
© 2003-2017
Clifford W Fulford.
Fulford Consulting Ltd.
Regd. Co. 4250037 in England & Wales.
Regd. office 162, Edward Rd. Nottingham NG2 5GF, England, UK.
Related web sites: City Linux | Flare Support | West Bridgford | Fulford Portal | Joan Mary Fulford (Nottingham Writer) | Fulford Gallery | Amharic Interpreter | Arabic Interpreter | Tigrinya Interpreter
The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.