A modification to the decade-old check_multiaddr perl script so that it doesn't chop off output from the called script.
#/bin/bash | |
IP="10.x.x.x" | |
#Look for number of received pings, if 0 received then restart OpenVPN service | |
RESULT=`ping -c 2 -W 1 $IP | grep transmitted | awk '{print $4}'` | |
if [ $? -ne 0 ] && [ $RESULT -eq 0 ] | |
then |
(([0-9a-f]{2}:){5}[0-9a-f]{2}) |
#!/bin/sh | |
# | |
###################################################################################################### | |
# | |
# Description: | |
# Backup pfSense 2.3 Firewalls to Local Disk | |
# | |
###################################################################################################### | |
# | |
# Author: Nick Peelman |
class puppetlabs { | |
# Install Puppet repository and call apt-get update | |
case $operatingsystem { | |
ubuntu: { | |
$key = "4BD6EC30" | |
exec { 'apt-key puppetlabs': | |
path => "/bin:/usr/bin", | |
unless => "apt-key list | grep '${key}' | grep -v expired", | |
command => "apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${key}", | |
} |
Dashing.io Widget for UnifiVideo NVR
This method uses API Key access so I suggest you setup a guest account with API access but limited (Visible and View Feed) access. Then login as the guest user, enable API access, and generate a new key. Copy the key for use.
Switch to the Devices tab and open the Configure dialog for the cam. On the Details tab, right-click the thumbnail view and Copy the image URL to the clipboard. It will look similar to the following if pasted to an address bar or text editor: http://192.168.1.105:7443//api/2.0/snapshot/camera/05a2bc63-d1ce-399f-8327-3a19b0cd3e8f?width=%d&force=true
The guid after /camera/ is what you want to use in the unifivideo.rb file.
You can setup as many cameras as you want, just add a name and UUID for each to the secrets/unifi.yml file.
##Description Simple Dashing widget (and associated job) to display general puppetdb status. Pulled the API calls from Puppetboard.
WARNING: This only works if puppetdb is listening on HTTP. I have not gotten around to getting this to work with SSL client certificates yet. If you know how, please leave them at the comments below.
##Dependencies None
Simple Dashing widget to countdown until a certain moment. Flashes the widget when finished.
##Usage
To use this widget, copy countdown.html
, countdown.coffee
, and countdown.scss
into the /widgets/countdown
directory.
To include the widget in a dashboard, add the following snippet to the dashboard layout file:
require 'net/ping' | |
@icmp = Net::Ping::ICMP.new('142.40.81.34') | |
rtary = [] | |
pingfails = 0 | |
repeat = 5 | |
puts 'starting to ping' | |
(1..repeat).each do | |
if @icmp.ping |