Merge pull request #186914 from evils/tuptime
This commit is contained in:
commit
e1951451e0
2 changed files with 9 additions and 9 deletions
|
@ -45,7 +45,7 @@ in {
|
||||||
services = {
|
services = {
|
||||||
|
|
||||||
tuptime = {
|
tuptime = {
|
||||||
description = "the total uptime service";
|
description = "The total uptime service";
|
||||||
documentation = [ "man:tuptime(1)" ];
|
documentation = [ "man:tuptime(1)" ];
|
||||||
after = [ "time-sync.target" ];
|
after = [ "time-sync.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
@ -59,10 +59,9 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
tuptime-oneshot = mkIf cfg.timer.enable {
|
tuptime-sync = mkIf cfg.timer.enable {
|
||||||
description = "the tuptime scheduled execution unit";
|
description = "Tuptime scheduled sync service";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
StateDirectory = "tuptime";
|
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "_tuptime";
|
User = "_tuptime";
|
||||||
ExecStart = "${pkgs.tuptime}/bin/tuptime -x";
|
ExecStart = "${pkgs.tuptime}/bin/tuptime -x";
|
||||||
|
@ -70,8 +69,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
timers.tuptime = mkIf cfg.timer.enable {
|
timers.tuptime-sync = mkIf cfg.timer.enable {
|
||||||
description = "the tuptime scheduled execution timer";
|
description = "Tuptime scheduled sync timer";
|
||||||
# this timer should be started if the service is started
|
# this timer should be started if the service is started
|
||||||
# even if the timer was previously stopped
|
# even if the timer was previously stopped
|
||||||
wantedBy = [ "tuptime.service" "timers.target" ];
|
wantedBy = [ "tuptime.service" "timers.target" ];
|
||||||
|
@ -80,7 +79,7 @@ in {
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnBootSec = "1min";
|
OnBootSec = "1min";
|
||||||
OnCalendar = cfg.timer.period;
|
OnCalendar = cfg.timer.period;
|
||||||
Unit = "tuptime-oneshot.service";
|
Unit = "tuptime-sync.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tuptime";
|
pname = "tuptime";
|
||||||
version = "5.1.0";
|
version = "5.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "rfrail3";
|
owner = "rfrail3";
|
||||||
repo = "tuptime";
|
repo = "tuptime";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-6N4dqgLOhWqVR8GqlBUxHWy10AHBZ4aZbdkw5SOxxBQ=";
|
sha256 = "sha256-s0VtKOaSPQlF58/2m/DwYDuHHPGnHVAJMA/p3hISTNE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||||
|
@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Total uptime & downtime statistics utility";
|
description = "Total uptime & downtime statistics utility";
|
||||||
homepage = "https://github.com/rfrail3/tuptime";
|
homepage = "https://github.com/rfrail3/tuptime";
|
||||||
|
changelog = "https://github.com/rfrail3/tuptime/blob/master/CHANGELOG";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = [ maintainers.evils ];
|
maintainers = [ maintainers.evils ];
|
||||||
|
|
Loading…
Reference in a new issue