Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hcooper committed Apr 21, 2020
1 parent 4f17d0f commit 99d7e23
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 11 additions & 1 deletion backuppc/hash-to-json.pl
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
#!/usr/bin/perl # A cli tool I wanted to use outputted a perl hash as a string. # This reads it in from stdin, and returns json instead. use JSON; my @lines = <STDIN>; my %Status; # TODO: Unhard-code this. eval $lines[0]; #TODO: handle multiple lines? my $json = encode_json \%Status; print $json;
#!/usr/bin/perl
# A cli tool I wanted to use outputted a perl hash as a string.
# This reads it in from stdin, and returns json instead.
use JSON;
my @lines = <STDIN>;

my %Status; # TODO: Unhard-code this.
eval $lines[0]; #TODO: handle multiple lines?

my $json = encode_json \%Status;
print $json;
6 changes: 5 additions & 1 deletion chef_age/chef_age.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env python3

''' Check the age of a status file chef touches '''
'''
Some hosts run chef via cron like this:
/usr/bin/chef-solo && touch /run/chef.last_success
This check monitors the age of the last_success file.
'''

import os
import time
Expand Down

0 comments on commit 99d7e23

Please sign in to comment.