munin: fix dbfile finding

This commit is contained in:
Brian Warner 2016-05-26 17:54:43 -07:00
parent 6578d39c9b
commit 6aa1747b46
5 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ import os, sys, time, sqlite3
def count_events():
serverdir = os.environ["serverdir"]
dbfile = os.path.join(serverdir, "relay.sqlite")
if not os.path.exists("relay.sqlite"):
if not os.path.exists(dbfile):
print "cannot find relay.sqlite, please set env.serverdir"
sys.exit(1)
db = sqlite3.connect(dbfile)

View File

@ -12,7 +12,7 @@ import os, sys, sqlite3
def count_events():
serverdir = os.environ["serverdir"]
dbfile = os.path.join(serverdir, "relay.sqlite")
if not os.path.exists("relay.sqlite"):
if not os.path.exists(dbfile):
print "cannot find relay.sqlite, please set env.serverdir"
sys.exit(1)
db = sqlite3.connect(dbfile)

View File

@ -12,7 +12,7 @@ import os, sys, sqlite3
def count_events():
serverdir = os.environ["serverdir"]
dbfile = os.path.join(serverdir, "relay.sqlite")
if not os.path.exists("relay.sqlite"):
if not os.path.exists(dbfile):
print "cannot find relay.sqlite, please set env.serverdir"
sys.exit(1)
db = sqlite3.connect(dbfile)

View File

@ -12,7 +12,7 @@ import os, sys, time, sqlite3
def count_events():
serverdir = os.environ["serverdir"]
dbfile = os.path.join(serverdir, "relay.sqlite")
if not os.path.exists("relay.sqlite"):
if not os.path.exists(dbfile):
print "cannot find relay.sqlite, please set env.serverdir"
sys.exit(1)
db = sqlite3.connect(dbfile)

View File

@ -12,7 +12,7 @@ import os, sys, sqlite3
def count_events():
serverdir = os.environ["serverdir"]
dbfile = os.path.join(serverdir, "relay.sqlite")
if not os.path.exists("relay.sqlite"):
if not os.path.exists(dbfile):
print "cannot find relay.sqlite, please set env.serverdir"
sys.exit(1)
db = sqlite3.connect(dbfile)