fix install
This commit is contained in:
parent
44eb3bbe7d
commit
595f2d0d1a
1 changed files with 7 additions and 10 deletions
|
@ -1,15 +1,12 @@
|
|||
import click
|
||||
from sh import sudo
|
||||
import os
|
||||
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
from yubi_lock.api import BASE_DIR
|
||||
|
||||
|
||||
@click.command('install', short_help='Install required files for insertion detection')
|
||||
@click.option('-v', '--verbose')
|
||||
def cli(verbose):
|
||||
if verbose:
|
||||
print("Exporting UDEV rule...")
|
||||
sudo.cp(BASE_DIR + "../data/85-yubikey-screen-lock.rules", "/etc/udev/rules.d/85-yubikey-screen-lock.rules")
|
||||
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!')
|
||||
else:
|
||||
print('Something went wrong!')
|
||||
|
|
Reference in a new issue