feat(systemd-manager): Support sudo password and root detection in SystemdManager; add user/group support in services and templates; add tests and expand README

This commit is contained in:
2025-09-03 11:16:45 +00:00
parent 0ae3b9a5ec
commit 972688b8be
9 changed files with 552 additions and 78 deletions

View File

@@ -6,13 +6,17 @@ import {
} from './smartdaemon.classes.service.js';
import { SmartDaemonSystemdManager } from './smartdaemon.classes.systemdmanager.js';
export interface ISmartDaemonOptions {
sudoPassword?: string;
}
export class SmartDaemon {
public templateManager: SmartDaemonTemplateManager;
public systemdManager: SmartDaemonSystemdManager;
constructor() {
constructor(optionsArg?: ISmartDaemonOptions) {
this.templateManager = new SmartDaemonTemplateManager(this);
this.systemdManager = new SmartDaemonSystemdManager(this);
this.systemdManager = new SmartDaemonSystemdManager(this, optionsArg?.sudoPassword);
}
/**