mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
move sound specification from config to source
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
c2c6e00651
commit
e5fb445287
18
doorlockd
18
doorlockd
@ -39,6 +39,9 @@ from wtforms.validators import DataRequired, Length
|
|||||||
SYSCONFDIR = '.'
|
SYSCONFDIR = '.'
|
||||||
PREFIX = '.'
|
PREFIX = '.'
|
||||||
|
|
||||||
|
root_prefix = join(PREFIX, 'share', 'doorlockd')
|
||||||
|
sounds_prefix = join(root_prefix, 'sounds')
|
||||||
|
|
||||||
__author__ = 'Ralf Ramsauer'
|
__author__ = 'Ralf Ramsauer'
|
||||||
__copyright = 'Copyright (c) Ralf Ramsauer, 2018'
|
__copyright = 'Copyright (c) Ralf Ramsauer, 2018'
|
||||||
__license__ = 'GPLv2'
|
__license__ = 'GPLv2'
|
||||||
@ -76,12 +79,13 @@ if 'LDAP_CA' in webapp.config.keys():
|
|||||||
ldap_uri = webapp.config.get('LDAP_URI')
|
ldap_uri = webapp.config.get('LDAP_URI')
|
||||||
ldap_binddn = webapp.config.get('LDAP_BINDDN')
|
ldap_binddn = webapp.config.get('LDAP_BINDDN')
|
||||||
|
|
||||||
wave_emergency = webapp.config.get('WAVE_EMERGENCY')
|
wave_emergency = 'emergency_unlock.wav'
|
||||||
wave_lock = webapp.config.get('WAVE_LOCK')
|
wave_lock = 'lock.wav'
|
||||||
wave_lock_button = webapp.config.get('WAVE_LOCK_BUTTON')
|
wave_lock_button = 'lock_button.wav'
|
||||||
wave_unlock = webapp.config.get('WAVE_UNLOCK')
|
wave_unlock = 'unlock.wav'
|
||||||
wave_unlock_button = webapp.config.get('WAVE_UNLOCK_BUTTON')
|
wave_unlock_button = 'unlock_button.wav'
|
||||||
wave_zonk = webapp.config.get('WAVE_ZONK')
|
wave_zonk = 'zonk.wav'
|
||||||
|
|
||||||
sounds = webapp.config.get('SOUNDS')
|
sounds = webapp.config.get('SOUNDS')
|
||||||
|
|
||||||
host = 'localhost'
|
host = 'localhost'
|
||||||
@ -118,7 +122,7 @@ def choose_insult():
|
|||||||
def playsound(filename):
|
def playsound(filename):
|
||||||
if not sounds:
|
if not sounds:
|
||||||
return
|
return
|
||||||
Popen(['nohup', 'aplay', filename])
|
Popen(['nohup', 'aplay', join(sounds_prefix, filename)])
|
||||||
|
|
||||||
|
|
||||||
def start_hook(script):
|
def start_hook(script):
|
||||||
|
@ -12,10 +12,3 @@ LDAP_BINDDN = 'cn=%s,ou=people,dc=binary-kitchen,dc=de'
|
|||||||
BOOTSTRAP_SERVE_LOCAL = True
|
BOOTSTRAP_SERVE_LOCAL = True
|
||||||
|
|
||||||
SERIAL_PORT = '/dev/ttyAMA0'
|
SERIAL_PORT = '/dev/ttyAMA0'
|
||||||
|
|
||||||
WAVE_EMERGENCY = './sounds/emergency_unlock.wav'
|
|
||||||
WAVE_LOCK = './sounds/lock.wav'
|
|
||||||
WAVE_LOCK_BUTTON = './sounds/lock_button.wav'
|
|
||||||
WAVE_UNLOCK = './sounds/unlock.wav'
|
|
||||||
WAVE_UNLOCK_BUTTON = './sounds/unlock_button.wav'
|
|
||||||
WAVE_ZONK = './sounds/zonk.wav'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user