Skip to content

Instantly share code, notes, and snippets.

<?php
#
# Copyright (c) 2014 Guillaume <maethor> Subiron (http://www.sysnove.fr/)
# Plugin: check_nginx_status
#
$colors = array(
'read' => '#5a3d99',
'write' => '#ff0000',
'wait' => '#e5ca44',
$ command -v foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
$ type foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
$ hash foo 2>/dev/null || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }