# Systemd & Shell Integration Reference The units installed and enabled by `postinstall.sh`, plus the `pos` bash completion. - [Services](#services) - [`autostart.service`](#autostartservice) - [`usb-automount.service`](#usb-automountservice) - [`ssh-agent.service`](#ssh-agentservice) - [Per-user units (`pos network download`)](#per-user-units-pos-network-download) - [Stop behavior](#stop-behavior) - [Feature-flag gating](#feature-flag-gating) - [Bash completion](#bash-completion) --- ## Services `postinstall.sh` copies every `systemd/*.service` (and `systemd/*.timer`) to `/etc/systemd/system/`, runs `systemctl daemon-reload`, then enables each one (see the gating rule below). ### autostart.service **Purpose:** run `features/autostart.sh` at boot (after the network is online) and keep retrying if it fails. ```ini [Unit] Description=My Linux Autostart Script After=network-online.target Wants=network-online.target [Service] Type=simple ExecStart=/usr/local/bin/autostart.sh Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target ``` **Configuration:** point `ExecStart` at your boot script. Because the target script is a *feature*, this unit is only **enabled** when the `autostart` flag is set — the file is still copied, but a skipped feature leaves the unit present-but-disabled. ### usb-automount.service **Purpose:** mount USB storage automatically — at boot (via `WantedBy=multi-user.target`) and on hotplug (a udev rule installed by the feature script triggers this unit). Each run mounts every unmounted removable block device at `/media/