Skip to content

Commit 2c83ad5

Browse files
committed
do it again
1 parent 20f3e15 commit 2c83ad5

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

modules/sabnzbd/configureApiService.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@ in {
145145
serviceConfig = {
146146
description = "Configure SABnzbd via API";
147147
after = ["sabnzbd.service"];
148-
wants = ["sabnzbd.service"];
149-
partOf = ["sabnzbd.service"];
150-
wantedBy = ["multi-user.target"];
148+
bindsTo = ["sabnzbd.service"];
151149

152150
serviceConfig = {
153151
Type = "oneshot";

modules/sabnzbd/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ in {
165165
after = ["nixflix-setup-dirs.service" "network-online.target"];
166166
requires = ["nixflix-setup-dirs.service"];
167167
wants = ["network-online.target"];
168+
# Ensure sabnzbd-config runs every time sabnzbd starts
169+
upholds = ["sabnzbd-config.service"];
168170

169171
serviceConfig = {
170172
ExecStartPre = pkgs.writeShellScript "sabnzbd-prestart" ''
@@ -190,7 +192,6 @@ in {
190192
echo "SABnzbd configuration already exists, skipping creation"
191193
fi
192194
'';
193-
ExecStartPost = "${pkgs.systemd}/bin/systemctl --no-block restart sabnzbd-config.service";
194195
};
195196
};
196197

0 commit comments

Comments
 (0)