#!/bin/bash ### BEGIN INIT INFO # Provides: mackerel-retire # Required-Start: $network $local_fs # Required-Stop: $network $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # description: mackerel retire ### END INIT INFO API_KEY="hogehoge" HOST_ID=$(cat /var/lib/mackerel-agent/id) LOCKFILE=/var/lock/subsys/mackerel-retire case "$1" in start) touch ${LOCKFILE} ;; stop) curl -X POST "https:/