* Implement Arch package build process in release workflow * Add Debian and RPM packaging specifications * Include man page installation in Makefile * Create unitdore man page for documentation
144 lines
3.7 KiB
Groff
144 lines
3.7 KiB
Groff
.TH UNITDORE 1 "2026-04-08" "0.1.0" "User Commands"
|
|
.SH NAME
|
|
unitdore \- manage container units via systemd
|
|
.SH SYNOPSIS
|
|
.B unitdore
|
|
[\fB\-\-config\fR \fIpath\fR]
|
|
\fIcommand\fR
|
|
[\fIarguments\fR]
|
|
.SH DESCRIPTION
|
|
.B unitdore
|
|
bridges your container runtime (Podman, Docker) and systemd.
|
|
It discovers running containers, stores them in a config file, and generates
|
|
and manages systemd \fI.service\fR units for each one.
|
|
.SH OPTIONS
|
|
.TP
|
|
.BR \-\-config " " \fIpath\fR
|
|
Path to the units config file. Default: \fI/etc/unitdore/units.yaml\fR
|
|
.SH COMMANDS
|
|
.TP
|
|
.B syncup
|
|
Query all available runtimes for running containers and add any new ones to
|
|
the config. Reconciles existing entries: if a configured unit's container no
|
|
longer exists it is marked disabled with a reason.
|
|
.TP
|
|
.B install
|
|
Generate \fI.service\fR files for all enabled units and write them to the
|
|
appropriate systemd directory. Use \fB\-\-dry\-run\fR to preview without writing.
|
|
.TP
|
|
.B uninstall \fIname\fR
|
|
Disable, stop, and remove the service file for a specific unit.
|
|
.TP
|
|
.B startall
|
|
Run \fBsystemctl enable \-\-now\fR for all enabled, installed units in startup
|
|
order.
|
|
.TP
|
|
.B stopall
|
|
Run \fBsystemctl disable \-\-now\fR for all installed units in reverse startup
|
|
order.
|
|
.TP
|
|
.B start \fIname\fR
|
|
Start a specific unit by name (\fBsystemctl start\fR).
|
|
.TP
|
|
.B stop \fIname\fR
|
|
Stop a specific unit by name (\fBsystemctl stop\fR).
|
|
.TP
|
|
.B update \fIname\fR
|
|
Update a unit's config and recreate its service file.
|
|
.RS
|
|
.TP
|
|
.BR \-\-order " " \fIn\fR
|
|
Set the startup order.
|
|
.TP
|
|
.B \-\-enable
|
|
Enable the unit.
|
|
.TP
|
|
.B \-\-disable
|
|
Disable the unit.
|
|
.RE
|
|
.TP
|
|
.B status
|
|
Print a summary table of all managed units showing runtime, user, enabled
|
|
state, installed state, systemd active state, and disabled reason.
|
|
.TP
|
|
.B list
|
|
Print a table of all tracked units including the path to each service file.
|
|
.TP
|
|
.B edit
|
|
Open the units config file in \fB$EDITOR\fR. Falls back to \fBnvim\fR,
|
|
\fBnano\fR, \fBvi\fR in that order.
|
|
.SH CONFIG FILE
|
|
.B Location:
|
|
\fI/etc/unitdore/units.yaml\fR
|
|
.PP
|
|
.nf
|
|
prefix: "" # prepended to all service names, e.g. "prod-"
|
|
suffix: "" # appended to all service names, e.g. "-svc"
|
|
service_user: "" # User= in [Service]; defaults to current OS user
|
|
|
|
units:
|
|
- name: nginx
|
|
runtime: podman # podman | docker
|
|
user: "" # empty = system unit; set for rootless user unit
|
|
command: "" # optional: override ExecStart
|
|
order: 1 # startup order (lower = earlier)
|
|
delay: 0s # delay after previous order group
|
|
enabled: true
|
|
disabled_reason: "" # auto-set by syncup reconciliation
|
|
.fi
|
|
.SH GENERATED SERVICE FILES
|
|
System units are written to \fI/etc/systemd/system/\fR and user units to
|
|
\fI~/.config/systemd/user/\fR.
|
|
Service names follow the pattern:
|
|
.PP
|
|
.RS
|
|
\fBunitdore-\fR[\fIprefix\fR]\fIname\fR[\fIsuffix\fR]\fB.service\fR
|
|
.RE
|
|
.SH EXAMPLES
|
|
Discover containers and install their service files:
|
|
.PP
|
|
.RS
|
|
.nf
|
|
sudo unitdore syncup
|
|
sudo unitdore install
|
|
sudo unitdore startall
|
|
.fi
|
|
.RE
|
|
.PP
|
|
Preview generated service files without writing:
|
|
.PP
|
|
.RS
|
|
sudo unitdore install \-\-dry\-run
|
|
.RE
|
|
.PP
|
|
Start a single container unit:
|
|
.PP
|
|
.RS
|
|
sudo unitdore start nginx
|
|
.RE
|
|
.PP
|
|
Change startup order and re\-apply service file:
|
|
.PP
|
|
.RS
|
|
sudo unitdore update nginx \-\-order 2
|
|
.RE
|
|
.SH FILES
|
|
.TP
|
|
.I /etc/unitdore/units.yaml
|
|
Default configuration file.
|
|
.TP
|
|
.I /etc/systemd/system/unitdore-*.service
|
|
Generated system unit files.
|
|
.TP
|
|
.I ~/.config/systemd/user/unitdore-*.service
|
|
Generated rootless user unit files.
|
|
.SH REQUIREMENTS
|
|
systemd; Podman and/or Docker (only installed runtimes are used).
|
|
Root is required for system units; the relevant user for rootless units.
|
|
.SH SEE ALSO
|
|
.BR systemctl (1),
|
|
.BR podman (1),
|
|
.BR docker (1)
|
|
.SH AUTHORS
|
|
Hein (Warky Devs) \(em https://warky.dev
|