mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
Let scriptdir depend on PREFIX
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
179180dc4e
commit
95c35e7c06
@ -43,6 +43,7 @@ root_prefix = join(PREFIX, 'share', 'doorlockd')
|
|||||||
sounds_prefix = join(root_prefix, 'sounds')
|
sounds_prefix = join(root_prefix, 'sounds')
|
||||||
static_folder = join(root_prefix, 'static')
|
static_folder = join(root_prefix, 'static')
|
||||||
template_folder = join(root_prefix, 'templates')
|
template_folder = join(root_prefix, 'templates')
|
||||||
|
scripts_prefix = join(root_prefix, 'scripts')
|
||||||
|
|
||||||
flask_config = join(SYSCONFDIR, 'doorlockd.cfg')
|
flask_config = join(SYSCONFDIR, 'doorlockd.cfg')
|
||||||
|
|
||||||
@ -136,15 +137,15 @@ def start_hook(script):
|
|||||||
log.info('Hooks disabled: not starting %s' % script)
|
log.info('Hooks disabled: not starting %s' % script)
|
||||||
return
|
return
|
||||||
log.info('Starting hook %s' % script)
|
log.info('Starting hook %s' % script)
|
||||||
Popen(['nohup', script])
|
Popen(['nohup', join(scripts_prefix, script)])
|
||||||
|
|
||||||
|
|
||||||
def run_lock():
|
def run_lock():
|
||||||
start_hook('./scripts/post_lock')
|
start_hook('post_lock')
|
||||||
|
|
||||||
|
|
||||||
def run_unlock():
|
def run_unlock():
|
||||||
start_hook('./scripts/post_unlock')
|
start_hook('post_unlock')
|
||||||
|
|
||||||
|
|
||||||
class AuthMethod(Enum):
|
class AuthMethod(Enum):
|
||||||
|
Loading…
Reference in New Issue
Block a user