mirror of https://github.com/CIRCL/lookyloo
fix: Make update script windows compatible
parent
e492428bf5
commit
c38ec90bb1
|
@ -7,6 +7,8 @@ import subprocess
|
||||||
import shlex
|
import shlex
|
||||||
import sys
|
import sys
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import platform
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from lookyloo.helpers import get_homedir
|
from lookyloo.helpers import get_homedir
|
||||||
|
|
||||||
|
@ -79,18 +81,24 @@ def main():
|
||||||
|
|
||||||
print('* Validate configuration files.')
|
print('* Validate configuration files.')
|
||||||
keep_going(args.yes)
|
keep_going(args.yes)
|
||||||
run_command('tools/validate_config_files.py --check')
|
run_command(f'poetry run {str(Path("tools") / "validate_config_files.py")} --check')
|
||||||
|
|
||||||
print('* Update configuration files.')
|
print('* Update configuration files.')
|
||||||
keep_going(args.yes)
|
keep_going(args.yes)
|
||||||
run_command('tools/validate_config_files.py --update')
|
run_command(f'poetry run {str(Path("tools") / "validate_config_files.py")} --update')
|
||||||
|
|
||||||
print('* Update third party dependencies for the website.')
|
print('* Update third party dependencies for the website.')
|
||||||
keep_going(args.yes)
|
keep_going(args.yes)
|
||||||
run_command('tools/3rdparty.py')
|
run_command(f'poetry run {str(Path("tools") / "3rdparty.py")}')
|
||||||
|
|
||||||
print('* Restarting Lookyloo.')
|
print('* Restarting Lookyloo.')
|
||||||
keep_going(args.yes)
|
keep_going(args.yes)
|
||||||
|
if platform.system() == 'Windows':
|
||||||
|
print('Restarting Lookyloo with poetry...')
|
||||||
|
run_command('poetry run stop', expect_fail=True)
|
||||||
|
run_command('poetry run start', capture_output=False)
|
||||||
|
print('Lookyloo started.')
|
||||||
|
else:
|
||||||
service = "lookyloo"
|
service = "lookyloo"
|
||||||
p = subprocess.run(["systemctl", "is-active", "--quiet", service])
|
p = subprocess.run(["systemctl", "is-active", "--quiet", service])
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue