alte rumliegende aenderungen
This commit is contained in:
parent
b9f09e273b
commit
424d2d5603
1 changed files with 6 additions and 5 deletions
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
from bottle import route, run, post, request, template, debug, TEMPLATES, static_file
|
from bottle import route, run, post, request, template, debug, TEMPLATES, static_file
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
from os.path import join
|
import os
|
||||||
|
|
||||||
serverport = 83
|
serverport = 83
|
||||||
cryptcmd = "/sbin/cryptsetup"
|
cryptcmd = "/sbin/cryptsetup"
|
||||||
|
@ -35,13 +35,14 @@ mapperpath = "/dev/mapper/"
|
||||||
mappername = "vdc1"
|
mappername = "vdc1"
|
||||||
mntpoint = "/mnt"
|
mntpoint = "/mnt"
|
||||||
logo = "logo.png"
|
logo = "logo.png"
|
||||||
|
basedir = os.getcwd()
|
||||||
|
|
||||||
@route('/style/default.css')
|
@route('/style/default.css')
|
||||||
def server_static():
|
def server_static():
|
||||||
return static_file('default.css', root='/data/cryptobottle-dev/style')
|
return static_file('default.css', root= basedir + '/style')
|
||||||
@route(join('/style/', logo))
|
@route(os.path.join('/style/', logo))
|
||||||
def server_static():
|
def server_static():
|
||||||
return static_file(logo, root='/data/cryptobottle-dev/style')
|
return static_file(logo, root= basedir + '/style')
|
||||||
|
|
||||||
@route('/')
|
@route('/')
|
||||||
def index():
|
def index():
|
||||||
|
@ -80,7 +81,7 @@ def cryptopen():
|
||||||
cryptsetup = err
|
cryptsetup = err
|
||||||
elif len(cryptsetup) == 0:
|
elif len(cryptsetup) == 0:
|
||||||
cryptsetup = 'erfolgreich entschluesselt'
|
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()
|
(mount, mount_err) = shell.communicate()
|
||||||
if mount_err:
|
if mount_err:
|
||||||
mount = mount_err
|
mount = mount_err
|
||||||
|
|
Loading…
Reference in a new issue