Skip to content

Instantly share code, notes, and snippets.

Share a ZFS file system over SMB/CIFS and advertise it via mDNS so that it shows up in the OS X Finder. Assumes SmartOS, but should work fine on any illumos distribution.

# Allow guest access to a trusted subnet
zfs set sharesmb=ro=192.168.1.0/25,guestok=true,name=store zones/store

# Advertise the SMB service, it will now show up in Finder
dns-sd -R "Loft Server" _smb._tcp local 445 &

# Give it a pretty icon. If you want something different, choose from the list in
@bahamat
bahamat / cmon.sh
Last active April 25, 2024 18:43
Shell script to pull CMON metrics from Joyent Triton (https://www.joyent.com/triton)
#!/bin/bash
# shellcheck disable=SC2154
if [[ -n "$TRACE" ]]; then
export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -o xtrace
fi
export PATH=/opt/pkg/bin:/opt/local/bin:/opt/custom/bin:$PATH
@misuchiru03
misuchiru03 / plex-install.sh
Last active May 1, 2020 17:04
Plex Media Server installer for Void Linux
#!/bin/sh
if [ $(id -u) -ne 0 ]; then
echo "You must be root to run this."
exit 0
fi
missing=0
for pkg in wget curl rsync ar; do
echo -n "Checking for $pkg..."
@bahamat
bahamat / anycast
Last active August 2, 2020 16:47
Anycast Example using Quagga on SmartOS
#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# This is the SMF start method for anycast.
# Put it in /opt/custom/smf/anycast
set -o xtrace