Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/service/lib/managers/systemd.ts>SystemdService

Install a Deno application as a system service
Go to Latest
class SystemdService
import { SystemdService } from "https://deno.land/x/service@1.0.0-beta.6/lib/managers/systemd.ts";

Constructors

new
SystemdService()

Methods

private
rollback(servicePath: string, system: boolean)

Rolls back any changes made during the systemd service installation process by removing the service file.

Generates a systemd service configuration file content as a string based on the given options.

install(config: InstallServiceOptions, onlyGenerate: boolean)

Installs a command as a systemd service, checking for existing services with the same name and enabling linger if running in user mode.

Uninstalls a systemd service by removing the service file. Checks if the service exists and removes it if found.