-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added service installation files. Use newer PagerDuty dependency with…
… custom HttpClient optimization.
- Loading branch information
Showing
4 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$binaryPathName = Resolve-Path(join-path $PSScriptRoot "FreshPager.exe") | ||
|
||
New-Service -Name "FreshPager" -DisplayName "FreshPager" -Description "When Freshping detects that a check is down, it sends a webhook request to this server, which triggers a PagerDuty alert for the configured service." -BinaryPathName $binaryPathName.Path -DependsOn Tcpip | ||
sc.exe failure FreshPager actions= restart/0/restart/0/restart/0 reset= 86400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copy this file to /etc/systemd/system/ | ||
# | ||
# Install: sudo systemctl daemon-reload | ||
# Enable auto-start: sudo systemctl enable freshpager.service | ||
# Start: sudo systemctl start freshpager.service | ||
# Check status: sudo systemctl status freshpager.service | ||
# Read logs: sudo journalctl -u freshpager.service | ||
|
||
[Unit] | ||
Description=FreshPager | ||
|
||
[Service] | ||
Type=notify | ||
ExecStart=/opt/freshpager/freshpager | ||
WorkingDirectory=/opt/freshpager/ | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters