mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
nixos/selfoss: set Type=oneshot for selfoss-update.service
This ensures that `systemctl start` will block until the update is finished, as is common for a lot of script-like units around nixpkgs. In this case, it was particularly useful for the NixOS test in the subsequent commit.
This commit is contained in:
@@ -236,6 +236,7 @@ in
|
||||
|
||||
systemd.services.selfoss-update = {
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.php83}/bin/php ${dataDir}/cliupdate.php";
|
||||
StateDirectory = [ (baseNameOf dataDir) ];
|
||||
User = "${cfg.user}";
|
||||
@@ -243,7 +244,6 @@ in
|
||||
startAt = "hourly";
|
||||
after = [ "selfoss-config.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
};
|
||||
|
||||
services.nginx = mkIf cfg.nginx.enable {
|
||||
|
||||
Reference in New Issue
Block a user