Commit 375c556e authored by ale's avatar ale
Browse files

Fix default location of lurker data dir

parent 064a8ba1
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
RewriteRule ^(/list/.*\.html)/$ $1 [R] RewriteRule ^(/list/.*\.html)/$ $1 [R]
# disabilita il sito quando e' in corso la rigenerazione # disabilita il sito quando e' in corso la rigenerazione
RewriteCond /var/lib/lurker/.tmp -d RewriteCond /var/lib/lurker/data/.tmp -d
<Directory /var/lib/lurker/www> <Directory /var/lib/lurker/www>
Require all granted Require all granted
...@@ -22,10 +22,8 @@ ...@@ -22,10 +22,8 @@
AddDefaultCharset UTF-8 AddDefaultCharset UTF-8
# invoke lurker if the requested file does not exist # invoke lurker if the requested file does not exist
<IfModule mod_rewrite.c> RewriteEngine on
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ^(attach|list|mbox|message|mindex|search|splash|thread|zap)/[^/]+$ /cgi-lurker/lurker.cgi [L,PT,E=LURKER_CONFIG:/etc/lurker/lurker.conf,E=LURKER_FRONTEND:%{REQUEST_FILENAME}]
RewriteRule ^(attach|list|mbox|message|mindex|search|splash|thread|zap)/[^/]+$ /cgi-lurker/lurker.cgi [L,PT,E=LURKER_CONFIG:/etc/lurker/lurker.conf,E=LURKER_FRONTEND:%{REQUEST_FILENAME}]
</IfModule>
</Directory> </Directory>
</VirtualHost> </VirtualHost>
...@@ -22,10 +22,10 @@ import ( ...@@ -22,10 +22,10 @@ import (
) )
var ( var (
port = flag.Int("port", getenvInt("SMTP_PORT"), "smtp port") port = flag.Int("port", getenvInt("SMTP_PORT"), "smtp port")
hostname = flag.String("ehlo-hostname", os.Getenv("SMTP_EHLO_HOSTNAME"), "EHLO hostname") hostname = flag.String("ehlo-hostname", os.Getenv("SMTP_EHLO_HOSTNAME"), "EHLO hostname")
lurkerLibDir = flag.String("lurker-lib-dir", os.Getenv("LURKER_LIB_DIR"), "lurker library dir") lurkerDataDir = flag.String("lurker-data-dir", getenvDefault("LURKER_DATA_DIR", "/var/lib/lurker/data"), "lurker data dir")
addrPattern = flag.String("addr-rx", getenvDefault("LURKER_ADDR_RX", `lurker\+([^@]+)@.*`), "recipient address regular expression") addrPattern = flag.String("addr-rx", getenvDefault("LURKER_ADDR_RX", `lurker\+([^@]+)@.*`), "recipient address regular expression")
) )
var addrRx *regexp.Regexp var addrRx *regexp.Regexp
...@@ -43,7 +43,7 @@ func getenvDefault(key, dflt string) string { ...@@ -43,7 +43,7 @@ func getenvDefault(key, dflt string) string {
} }
func isMaintenanceModeOn() bool { func isMaintenanceModeOn() bool {
_, err := os.Stat(filepath.Join(*lurkerLibDir, ".tmp")) _, err := os.Stat(filepath.Join(*lurkerDataDir, ".tmp"))
return !os.IsNotExist(err) return !os.IsNotExist(err)
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment