Skip to content

Instantly share code, notes, and snippets.

View icasimpan's full-sized avatar

Ismael Casimpan Jr. icasimpan

View GitHub Profile
@icasimpan
icasimpan / pd-event.sh
Created March 30, 2021 20:53 — forked from alperkokmen/pd-event.sh
Simple script to trigger, acknowledge, and resolve incidents via PagerDuty Integration API.
#!/bin/bash
CONTENT_TYPE="application/json"
DESCRIPTION="bad things™ are happening"
URL="https://events.pagerduty.com/generic/2010-04-15/create_event.json"
if [ $# -ne 3 ]; then
echo "Usage: pd-event.sh [TYPE] [SERVICE KEY] [INCIDENT KEY]"
echo " - TYPE: [t]rigger | [a]cknowledge | [r]esolve"
echo " - SERVICE KEY: unique identifier for service"
NOTE: Copied as-is from "Linux Expert" forum in linkedin - https://www.linkedin.com/feed/update/urn:li:activity:7031604358630805504?utm_source=share&utm_medium=member_desktop
Not entirely tested from my end.
```
#!/bin/bash
# Update the package repository
apt-get update -y
# Install and configure the firewall (ufw)
apt-get install -y ufw