Fix service

This commit is contained in:
soraefir
2026-05-09 18:42:22 +02:00
parent 4b68accf2f
commit ad2b492b51
2 changed files with 6 additions and 3 deletions

View File

@@ -51,10 +51,11 @@ in
value = {
description = "Run ${containerSet.name} setup";
after = [ "podman-${containerSet.name}-${containerSet.setup.trigger}.service" ];
requires = [ "podman-${containerSet.name}-${containerSet.setup.trigger}.service" ];
wants = [ "podman-${containerSet.name}-${containerSet.setup.trigger}.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
TimeoutStartSec = "30s";
ExecStart = "${containerSet.setup.script}";
RemainAfterExit = true;
User = "root";

View File

@@ -60,14 +60,14 @@ in {
trigger="server";
script = pkgs.writeShellScript "setup" ''
# Define the command wrapper
OCC="${pkgs.podman}/bin/podman exec -u www-data nextcloud php occ"
OCC="${pkgs.podman}/bin/podman exec -u www-data nextcloud-server php occ"
echo "Waiting for Nextcloud container to start..."
until $OCC status > /dev/null 2>&1; do
sleep 2
done
echo "Maintenance ..."
echo "Maintenance..."
$OCC maintenance:repair --include-expensive --non-interaction
$OCC db:add-missing-indices --non-interaction
@@ -77,6 +77,8 @@ in {
$OCC config:system:set phone_region --value="CH"
$OCC config:app:set core backgroundjobs_mode --value="cron"
echo "Completed Setup"
'';
};
}