1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 10:24:26 +01:00

Let scriptdir depend on PREFIX

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
Ralf Ramsauer 2018-09-05 21:47:42 +00:00
parent 179180dc4e
commit 95c35e7c06
3 changed files with 4 additions and 3 deletions

View File

@ -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):