mirror of
https://git.adityakumar.xyz/monitor.git/
synced 2024-11-09 12:09:44 +00:00
add README
This commit is contained in:
parent
311fd173ec
commit
927be66a48
1 changed files with 35 additions and 0 deletions
35
README.md
Normal file
35
README.md
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# Monitor
|
||||||
|
Report website's status
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
### Oneshot
|
||||||
|
```nix
|
||||||
|
nix run github:akr2002/monitor
|
||||||
|
```
|
||||||
|
### Persistent
|
||||||
|
Add the following to your `home.nix`
|
||||||
|
```nix
|
||||||
|
systemd.user.timers.monitor = {
|
||||||
|
Install.WantedBy = [ "timers.target" ];
|
||||||
|
Timer = {
|
||||||
|
OnBootSec = "1m";
|
||||||
|
OnUnitActiveSec = "1m";
|
||||||
|
Unit = "monitor.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.services.monitor = {
|
||||||
|
Unit = {
|
||||||
|
Description = "A script to monitor websites.";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${inputs.monitor.packages.${pkgs.system}.default}/bin/monitor";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
Start:
|
||||||
|
```bash
|
||||||
|
systemctl --user start mointor.timer
|
||||||
|
```
|
Loading…
Reference in a new issue