Prva inacica paketa za Debian wheezy distribuciju. wheezy v2.23.05+1
authorDragan Dosen <Dragan.Dosen@CARNet.hr>
Thu, 15 Aug 2013 19:08:17 +0000 (21:08 +0200)
committerDragan Dosen <Dragan.Dosen@CARNet.hr>
Thu, 15 Aug 2013 19:08:17 +0000 (21:08 +0200)
README.CARNet
debian/changelog
debian/compat
debian/control
debian/copyright
debian/postinst
debian/source/format [new file with mode: 0644]

index bb905e5..e47c68e 100644 (file)
@@ -16,5 +16,4 @@ sadrzi popis korisnika i zaporke nalazi se na lokaciji:
 Pocetna zaporka za pristup je poslana root korisniku prilikom 
 instalacije paketa.
 
 Pocetna zaporka za pristup je poslana root korisniku prilikom 
 instalacije paketa.
 
-
- -- Dragan Dosen <Dragan.Dosen@CARNet.hr>  Sat, 30 Apr 2011 12:31:10 +0200
+ -- Dragan Dosen <Dragan.Dosen@CARNet.hr>  Tue, 13 Aug 2013 12:44:03 +0200
index 74e6c2f..d25b3f1 100644 (file)
@@ -1,3 +1,16 @@
+webalizer-cn (2.23.05+1) stable; urgency=low
+
+  * Prva inacica paketa za Debian wheezy distribuciju.
+  * Azurirane datoteke debian/README.CARNet, debian/copyright,
+    debian/compat i ovisnosti unutar debian/control.
+  * Dodana datoteka debian/source/format.
+  * debian/postinst - dodatne provjere konfiguracije, reload Apache2
+    samo u slucaju azuriranja Webalizer konfiguracije, preskakanje
+    datoteke /var/www/webalizer/.htpasswd ako se ustanovi da je
+    vrijednost za OutputDir razlicita od one koja je zadana paketom.
+
+ -- Dragan Dosen <Dragan.Dosen@CARNet.hr>  Tue, 13 Aug 2013 12:44:03 +0200
+
 webalizer-cn (2.01.10+2) stable; urgency=low
 
   * Promjena e-mail adrese odrzavatelja paketa.
 webalizer-cn (2.01.10+2) stable; urgency=low
 
   * Promjena e-mail adrese odrzavatelja paketa.
index 7f8f011..45a4fb7 100644 (file)
@@ -1 +1 @@
-7
+8
index f52e3a0..a6fc252 100644 (file)
@@ -2,20 +2,20 @@ Source: webalizer-cn
 Section: web
 Priority: optional
 Maintainer: Dragan Dosen <Dragan.Dosen@CARNet.hr>
 Section: web
 Priority: optional
 Maintainer: Dragan Dosen <Dragan.Dosen@CARNet.hr>
-Build-Depends: debhelper (>= 7)
-Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 8.0.0)
+Standards-Version: 3.9.3
 
 Package: webalizer-cn
 Architecture: all
 
 Package: webalizer-cn
 Architecture: all
-Pre-Depends: apache2-cn (>= 2.2)
-Depends: webalizer (>= 2.01.10-32.7), makepasswd, carnet-tools-cn (>= 3.0.0), ${misc:Depends}
+Pre-Depends: apache2-cn (>= 2.2.22+1)
+Depends: webalizer (>= 2.23.05-1), makepasswd, carnet-tools-cn (>= 3.0.4), ${misc:Depends}
 Description: web server log analysis program
  The Webalizer was designed to scan web server log files in various formats
 Description: web server log analysis program
  The Webalizer was designed to scan web server log files in various formats
- and produce usage statistics in  HTML format for viewing through a browser.
- The Webalizer produces yearly, monthly, daily and hourly statistics. In the
- monthly reports, various statistics may be produced to show overall usage,
- usage by day and hour, usage by visiting sites, URLs, user agents
- (browsers), referrers and country. The Webalizer is highly configurable by
+ and produce usage statistics in HTML format for viewing through a browser.
+ The Webalizer produces yearly, monthly, daily and hourly statistics.  In
+ the monthly reports, various statistics may be produced to show overall
+ usage, usage by day and hour, usage by visiting sites, URLs, user agents
+ (browsers), referrers and country.  The Webalizer is highly configurable by
  use of either command line options or a configuration file, allowing the
  program to be tailored to individual needs easily.
  .
  use of either command line options or a configuration file, allowing the
  program to be tailored to individual needs easily.
  .
index 5350ae7..dd9254d 100644 (file)
@@ -1,4 +1,4 @@
-Copyright 2011 CARNet 
+Copyright 2013 CARNet
 
 You are free to distribute this software package under the terms of the
 GNU General Public License.
 
 You are free to distribute this software package under the terms of the
 GNU General Public License.
index 6d76d60..2203c52 100755 (executable)
@@ -35,6 +35,8 @@ WCONFBAK=`basename $WCONF`
 oldreporttitle="usage statistics for"
 reporttitle="Statistika pristupa za"
 
 oldreporttitle="usage statistics for"
 reporttitle="Statistika pristupa za"
 
+customized=0
+need_restart=0
 
 if [ -f "$WCONF" ]; then
 
 
 if [ -f "$WCONF" ]; then
 
@@ -46,7 +48,9 @@ if [ -f "$WCONF" ]; then
     # Check for OutputDir
     temp=`awk 'tolower($1) == "outputdir" { print $2; }' $WCONF | tail -n 1`
     if [ "$temp" != "$WDIR" ]; then
     # Check for OutputDir
     temp=`awk 'tolower($1) == "outputdir" { print $2; }' $WCONF | tail -n 1`
     if [ "$temp" != "$WDIR" ]; then
+        cp_echo "CN: Found custom OutputDir value: $temp"
         db_set webalizer/directory "$temp" || true
         db_set webalizer/directory "$temp" || true
+        customized=1
     fi
 
     # Check for ReportTitle
     fi
 
     # Check for ReportTitle
@@ -58,9 +62,11 @@ if [ -f "$WCONF" ]; then
             "s/$temp_re/ReportTitle    ${reporttitle}/I" \
             "$WCONF" || true
         db_set webalizer/doc_title "$reporttitle" || true
             "s/$temp_re/ReportTitle    ${reporttitle}/I" \
             "$WCONF" || true
         db_set webalizer/doc_title "$reporttitle" || true
+        need_restart=1
     fi
 else
     cp_echo "CN: Configuration file $WCONF is missing."
     fi
 else
     cp_echo "CN: Configuration file $WCONF is missing."
+    customized=1
 fi
 
 db_stop || true
 fi
 
 db_stop || true
@@ -68,26 +74,34 @@ db_stop || true
 
 # Check Apache2 web server configuration and reload Apache2 web server.
 #
 
 # Check Apache2 web server configuration and reload Apache2 web server.
 #
-if apache2ctl configtest 2>/dev/null; then
-    invoke-rc.d apache2 force-reload || true
-else
-    # Something is broken.
-    cp_echo "CN: Your Apache2 configuration is broken."
-    cp_echo "CN: Please, check the service after the installation finishes!"
+if [ $need_restart -eq 1 ]; then
+    if apache2ctl configtest 2>/dev/null; then
+        invoke-rc.d apache2 force-reload || true
+    else
+        # Something is broken.
+        cp_echo "CN: Your Apache2 configuration is broken."
+        cp_echo "CN: Please, check the service after the installation finishes!"
+    fi
 fi
 
 
 # Generate e-mail message with informations (username and password).
 #
 fi
 
 
 # Generate e-mail message with informations (username and password).
 #
-if [ ! -f "$WHTPASSWD" ]; then
-    passwd="$(makepasswd --chars 8)"
-    htpasswd -bcm $WHTPASSWD admin $passwd 2> /dev/null
-    cp_echo ""
-    cp_echo "CN: Webalizer URL is http://`hostname -f`/stats/"
-    cp_echo "CN:            User: admin"
-    cp_echo "CN:        Password: $passwd"
-    cp_echo ""
-    cp_echo "CN: Use \"htpasswd -m $WHTPASSWD admin\" to change it."
+if [ $customized -eq 0 ]; then
+    if [ ! -f "$WHTPASSWD" ]; then
+        passwd="$(makepasswd --chars 8)"
+        htpasswd -bcm $WHTPASSWD admin $passwd 2> /dev/null
+        cp_echo ""
+        cp_echo "CN: Webalizer URL is http://`hostname -f`/stats/"
+        cp_echo "CN:            User: admin"
+        cp_echo "CN:        Password: $passwd"
+        cp_echo ""
+        cp_echo "CN: Use \"htpasswd -m $WHTPASSWD admin\" to change it."
+    else
+        cp_echo "CN: File $WHTPASSWD already exists."
+    fi
+else
+    cp_echo "CN: Skipping file $WHTPASSWD"
 fi
 
 # Mail root.
 fi
 
 # Mail root.
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)