Updated activation script. Fixed typo.
This commit is contained in:
@@ -1,12 +1,28 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
system.activationScripts.script.text = ''
|
||||
#!/bin/bash
|
||||
${pkgs.coreutils}/bin/mkdir -p /mnt/config/ /mnt/data/
|
||||
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/config/
|
||||
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/data/
|
||||
systemd.services.numbus-activation = {
|
||||
description = "Numbus Server Activation";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "local-fs.target" ];
|
||||
serviceConfig = {
|
||||
User = "numbus-admin";
|
||||
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
if [[ -e /etc/numbus-server/activated.true ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
${pkgs.coreutils}/bin/mkdir -p /mnt/config/ /mnt/data/
|
||||
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/config/
|
||||
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/data/
|
||||
|
||||
PODMAN_NETWORKS
|
||||
'';
|
||||
|
||||
${pkgs.coreutils}/bin/touch /etc/numbus-server/activated.true
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -44,7 +44,7 @@ TRAEFIK_REF_NETWORKS
|
||||
|
||||
systemd.services.traefik = {
|
||||
description = "Podman container : ${container_name}";
|
||||
after = [ "network.target" ];
|
||||
after = [ "network.target" "numbus-activation.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
|
||||
Reference in New Issue
Block a user