Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Latest commit

 

History

History
75 lines (48 loc) · 2.83 KB

README.md

File metadata and controls

75 lines (48 loc) · 2.83 KB

unifi-systemd-units

build

Systemd units for unifi-systemd container

Usage

Install unifi-systemd

  • UniFi OS >=1.10.0 <2.0.0 is required.

Install unifi-systemd.

podman exec unifi-os sh -c "curl -fsSLo /tmp/unifi-systemd_1.0.0_all.deb https://github.com/ntkme/unifi-systemd/releases/download/v1.0.0/unifi-systemd_1.0.0_all.deb && dpkg -i /tmp/unifi-systemd_1.0.0_all.deb && rm /tmp/unifi-systemd_1.0.0_all.deb"

Install systemd Units

Install systemd units from this repository to /mnt/data/etc/systemd/system.

curl -fsSL https://github.com/ntkme/unifi-systemd-units/archive/HEAD.tar.gz | tar -vxzC /mnt/data --strip-components 1 --exclude '*/.github' --exclude '*/docs' --exclude '*/test' --exclude '*/*.md' --exclude '*/LICENSE' && unifi-systemd reload

Manage systemd Units

unifi-systemd is a container that runs systemd and nested podman containers.

Use unifi-systemd shell to enter the container shell to interact with systemctl and podman.

See the links below for documentation of services provided by this repository.

To create a new container service unit, see podman-generate-systemd(1).

Config and Data Directories

Backup

It is recommended to gracefully stop all services with unifi-systemd stop before create a backup. Services can be restarted with unifi-systemd start.

By default, the following directories are used to store config and data.

  • /mnt/data/etc
  • /mnt/data/var
Store Data on Hard Disk

To store data on hard disk instead of the eMMC, move the directories into /mnt/data_ext and create symlinks on /mnt/data.

unifi-systemd stop
mv /mnt/data/etc /mnt/data_ext/etc && ln -s /mnt/data_ext/etc /mnt/data/etc
mv /mnt/data/var /mnt/data_ext/var && ln -s /mnt/data_ext/var /mnt/data/var
unifi-systemd start

Migrating from udm-boot

To migrate from udm-boot, please install unifi-systemd and unifi-systemd-units first.

podman exec unifi-os dpkg -P udm-boot
podman exec unifi-systemd systemctl enable unifi-entrypoint@mnt-data-on_boot.d.service