This file contains hidden or 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
name: build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Check GitHub Status | |
uses: crazy-max/ghaction-github-status@v1 | |
- |
This file contains hidden or 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
version: "3.5" | |
x-env-global: &env-global | |
- &MYSQL_DATABASE "librenms" | |
- &MYSQL_USER "librenms" | |
- &MYSQL_PASSWORD "asupersecretpassword" | |
- &TZ "UTC" | |
- &PUID "1000" | |
- &PGID "1000" |
This file contains hidden or 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
AWS_ACCESS_KEY_ID= | |
AWS_SECRET_ACCESS_KEY= | |
AWS_HOSTED_ZONE_ID= |
This file contains hidden or 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
credentials: | |
accessKeyID: "ABCDEFGHIJKLMNO123456" | |
secretAccessKey: "abcdefgh123456IJKLMN+OPQRS7890+ABCDEFGH" | |
route53: | |
hostedZoneID: "ABCEEFG123456789" | |
recordsSet: | |
- name: "ddns.example.com." | |
type: "A" | |
ttl: 300 |
This file contains hidden or 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
$ docker-compose logs -f | |
Attaching to bin_diun_1, cloudflared | |
cloudflared | time="2019-12-14T15:30:07+01:00" level=info msg="Adding DNS upstream" url="https://1.1.1.1/dns-query" | |
cloudflared | time="2019-12-14T15:30:07+01:00" level=info msg="Adding DNS upstream" url="https://1.0.0.1/dns-query" | |
cloudflared | time="2019-12-14T15:30:07+01:00" level=info msg="Starting metrics server" addr="[::]:49312" | |
cloudflared | time="2019-12-14T15:30:07+01:00" level=info msg="Starting DNS over HTTPS proxy server" addr="dns://0.0.0.0:5053" | |
diun_1 | Sat, 14 Dec 2019 15:30:07 CET INF Starting Diun v2.0.0 | |
diun_1 | Sat, 14 Dec 2019 15:30:07 CET INF Found 1 docker provider(s) to analyze... | |
diun_1 | Sat, 14 Dec 2019 15:30:10 CET INF New image found id=mydocker image=docker.io/crazymax/cloudflared:latest provider=docker | |
diun_1 | Sat, 14 Dec 2019 15:30:12 CET INF New image found id=mydocker image=docker.io/crazymax/cloudflared:2019.9.0 provider=docker |
This file contains hidden or 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
version: "3.5" | |
services: | |
diun: | |
image: crazymax/diun:latest | |
volumes: | |
- "./data:/data" | |
- "./diun.yml:/diun.yml:ro" | |
- "/var/run/docker.sock:/var/run/docker.sock" | |
environment: |
This file contains hidden or 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
name: release | |
on: | |
push: | |
branches-ignore: | |
- '**' | |
tags: | |
- 'v*.*.*' | |
jobs: |
This file contains hidden or 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 | |
TMP_FILE=/tmp/check-smart-errors.log | |
for I in $(ls /sys/block); do | |
smartctl -a /dev/$I > $TMP_FILE | |
if [ "$?" -ne "1" ]; then | |
DEVICE_MODEL="$(smartctl -a /dev/$I | grep -i 'device model')" | |
echo "DISK $I - $DEVICE_MODEL" | |
cat "$TMP_FILE" | grep -v "\- 0" | grep Raw_Read_Error_Rate |
This file contains hidden or 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 | |
FOLDER="/mnt" | |
MAIL="root" | |
tree -ah -H $FOLDER --nolinks -- $FOLDER > /tmp/tree-folder.html | |
echo "See attachment." | mutt -a "/tmp/tree-folder.html" -s "Tree of $FOLDER on `hostname`" -- $MAIL |
This file contains hidden or 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 | |
MAX_RETRIES=3 | |
function sayHelloTo() { | |
echo "Hello $1!" | |
if [ -z "$2" ]; then local retry=0; else local retry=$2; fi | |
# Make something and test | |
if [ -d "/tmp/" ] |