This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if ! grep -q 'sched\.py' /etc/crontab; then | |
mount | grep -q 'on / .*ro' | |
is_ro=$? | |
if [ $is_ro -eq 0 ]; then | |
mount -o remount,rw / | |
fi | |
cat >> /etc/crontab <<EOF | |
# Set scheduled charges based on zcell maintenance cycle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOME=${HOME:-/tmp} | |
WARNING_URL=ftp://ftp.bom.gov.au/anon/gen/fwo/IDT29000.txt | |
LAST_WARNING=$HOME/sheep-graziers-warning.last | |
NEXT_WARNING=$HOME/sheep-graziers-warning.next | |
rm -f $NEXT_WARNING | |
/usr/bin/curl -s -o $NEXT_WARNING $WARNING_URL | |
[ -e "$NEXT_WARNING" ] || exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import dbus | |
import logging | |
import requests | |
from datetime import datetime | |
# Note that when log output lands in /var/log/messages via cron, lines are | |
# truncated at about 250 characters for some reason. |
OlderNewer