archive
/
yubi-lock
Archived
1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
yubi-lock/yubi_lock/install/cli.py

14 lines
484 B
Python

import click
import os
from yubi_lock.api import BASE_DIR
@click.command('install', short_help='Install required files for insertion detection')
def cli():
exit_code = os.system("sudo cp {} {}".format(BASE_DIR + "/data/85-yubikey-screen-lock.rules", "/etc/udev/rules.d/85-yubikey-screen-lock.rules"))
if exit_code == 0:
print('Export complete! Refreshing...')
os.system("sudo udevadm control --reload-rules")
else:
print('Something went wrong!')