diff --git a/routlin/core.py b/routlin/core.py index 00299a6..8debb38 100644 --- a/routlin/core.py +++ b/routlin/core.py @@ -142,6 +142,13 @@ WG_KEEPALIVE = 25 # Helpers # =================================================================== +def chown_to_script_dir_owner(path): + try: + stat = SCRIPT_DIR.stat() + os.chown(path, stat.st_uid, stat.st_gid) + except OSError: + pass + def service_warning(action, svc, stderr): """Print a service start/restart warning, adding install hint if unit not found.""" msg = stderr.strip()