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

ntkme/unifi-systemd-units

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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