alte rumliegende aenderungen

This commit is contained in:
age 2012-11-28 14:17:42 +00:00
parent b9f09e273b
commit 424d2d5603

View file

@ -24,7 +24,7 @@
from bottle import route, run, post, request, template, debug, TEMPLATES, static_file
from subprocess import Popen, PIPE
from os.path import join
import os
serverport = 83
cryptcmd = "/sbin/cryptsetup"
@ -35,13 +35,14 @@ mapperpath = "/dev/mapper/"
mappername = "vdc1"
mntpoint = "/mnt"
logo = "logo.png"
basedir = os.getcwd()
@route('/style/default.css')
def server_static():
return static_file('default.css', root='/data/cryptobottle-dev/style')
@route(join('/style/', logo))
return static_file('default.css', root= basedir + '/style')
@route(os.path.join('/style/', logo))
def server_static():
return static_file(logo, root='/data/cryptobottle-dev/style')
return static_file(logo, root= basedir + '/style')
@route('/')
def index():
@ -80,7 +81,7 @@ def cryptopen():
cryptsetup = err
elif len(cryptsetup) == 0:
cryptsetup = 'erfolgreich entschluesselt'
shell = Popen([mntcmd, join(mapperpath, mappername), mntpoint], stdout=PIPE,stderr=PIPE)
shell = Popen([mntcmd, os.path.join(mapperpath, mappername), mntpoint], stdout=PIPE,stderr=PIPE)
(mount, mount_err) = shell.communicate()
if mount_err:
mount = mount_err