cleaner systemd
This commit is contained in:
parent
4adc8da597
commit
0c67559965
1 changed files with 32 additions and 28 deletions
|
|
@ -74,7 +74,9 @@ in
|
||||||
config.services.wanikani-stats.port
|
config.services.wanikani-stats.port
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.wanikani-stats = {
|
systemd = {
|
||||||
|
services = {
|
||||||
|
wanikani-stats = {
|
||||||
description = "WaniKani Stats Service";
|
description = "WaniKani Stats Service";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
@ -89,7 +91,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# Timer to restart the service every 12 hours
|
# Timer to restart the service every 12 hours
|
||||||
systemd.services.wanikani-stats-restart = {
|
wanikani-stats-restart = {
|
||||||
description = "Restart WaniKani Stats Service";
|
description = "Restart WaniKani Stats Service";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
@ -97,8 +99,9 @@ in
|
||||||
User = "root";
|
User = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.timers.wanikani-stats-restart = {
|
timers.wanikani-stats-restart = {
|
||||||
description = "Timer to restart WaniKani Stats Service every 12 hours";
|
description = "Timer to restart WaniKani Stats Service every 12 hours";
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
|
|
@ -108,4 +111,5 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue