mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
0.9.0
This commit is contained in:
13
bauh/view/core/timeshift.py
Normal file
13
bauh/view/core/timeshift.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from bauh.commons.system import run_cmd, SimpleProcess
|
||||
|
||||
|
||||
def is_available() -> bool:
|
||||
return bool(run_cmd('which timeshift', print_error=False))
|
||||
|
||||
|
||||
def delete_all_snapshots(root_password: str) -> SimpleProcess:
|
||||
return SimpleProcess(['timeshift', '--delete-all', '--scripted'], root_password=root_password)
|
||||
|
||||
|
||||
def create_snapshot(root_password: str) -> SimpleProcess:
|
||||
return SimpleProcess(['timeshift', '--create', '--scripted'], root_password=root_password)
|
||||
Reference in New Issue
Block a user