diff --git a/systemd/loading-program.service b/systemd/loading-program.service new file mode 100644 index 0000000..96c320e --- /dev/null +++ b/systemd/loading-program.service @@ -0,0 +1,15 @@ +# /etc/systemd/system/provision-homes.service +[Unit] +Description=Create home directories for lab-committee members +RequiresMountsFor=/mnt/stockroom +Wants=network-online.target +After=network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/local/sbin/loading-program +CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER +NoNewPrivileges=yes +ProtectSystem=strict +ReadWritePaths=/mnt/stockroom/homes +PrivateTmp=yes diff --git a/systemd/loading-program.timer b/systemd/loading-program.timer new file mode 100644 index 0000000..1d4874f --- /dev/null +++ b/systemd/loading-program.timer @@ -0,0 +1,10 @@ +# /etc/systemd/system/loading-program.timer +[Unit] +Description=Periodically provision lab-committee home directories + +[Timer] +OnBootSec=2min +OnUnitActiveSec=5min + +[Install] +WantedBy=timers.target