23 lines
535 B
Bash
23 lines
535 B
Bash
#!/bin/sh
|
|
|
|
case "$1" in
|
|
"copy-monitors")
|
|
yarn copy-monitors
|
|
;;
|
|
"disable-uptime-robot")
|
|
yarn disable-uptime-robot
|
|
;;
|
|
"delete-uptime-robot")
|
|
echo "DANGER!!: This action can not be undone"
|
|
read -p "Are you sure you want to delete all UptimeRobot monitors? (yes/no): " confirm
|
|
if [[ $confirm == "yes" ]]; then
|
|
yarn delete-uptime-robot
|
|
else
|
|
echo "Deletion canceled."
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {copy-monitors | disable-uptime-robot | delete-uptime-robot}"
|
|
exit 1
|
|
;;
|
|
esac |