Skip to content

Instantly share code, notes, and snippets.

View jarrettgilliam's full-sized avatar

Jarrett Gilliam jarrettgilliam

View GitHub Profile
@jarrettgilliam
jarrettgilliam / install-docker-wsl2.ps1
Last active July 10, 2023 19:06
Install docker in WSL2 using systemd
# References
# https://dev.to/klo2k/run-docker-in-wsl2-in-5-minutes-via-systemd-without-docker-desktop-28gi
# https://docs.docker.com/engine/install/ubuntu/
# Enable and start systemd
wsl.exe --update --web-download
wsl.exe -u root /bin/bash -c 'echo -e "[boot]\nsystemd=true" | tee /etc/wsl.conf'
wsl.exe --shutdown
wsl.exe /bin/bash -c 'systemctl --no-pager status user.slice &>> /dev/null && echo "OK: Systemd is running" || echo "FAIL: Systemd not running"'
#!/bin/bash
# This script is to facilitate installing/upgrading
# `plexmediaserver` on the ODROID-XU4 platform.
# Pass the Synology/ARMV7 package as the first argument
#
# Credit to youtuber femtronic.com for most of this.
# https://www.youtube.com/watch?v=hcCRfbzlhUo
# failure function
function failure() {
@jarrettgilliam
jarrettgilliam / mondo-backup.sh
Last active September 6, 2020 21:11
Mondo archive backup script
#!/bin/bash
# Backup system with mondoarchive
backupLocation=''
nbrOfBackups=8
ignore='/home|/media|/mnt|/dev|/var/lib/transmission-daemon'
backupPrefix="Backup."
function is_integer() {
echo "$1" | grep -qE '^[0-9]+$'
@jarrettgilliam
jarrettgilliam / rsync-backup.sh
Last active September 6, 2020 21:10
Rsync backup script
#!/bin/bash
# Backups using rsync
function is_integer() {
echo "$1" | grep -qE '^[0-9]+$'
return "$?"
}
function is_valid_host {
getent hosts "$1" >/dev/null