Skip to content

Instantly share code, notes, and snippets.

@No9
Last active October 16, 2021 06:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save No9/41214b80a0dbe827085eb5ec1c5b45fe to your computer and use it in GitHub Desktop.
Save No9/41214b80a0dbe827085eb5ec1c5b45fe to your computer and use it in GitHub Desktop.
consuld - a consul daemon config for freebsd
#!/bin/sh
#
# $FreeBSD: releng/11.0/etc/rc.d/consuld 298514 2016-04-23 16:10:54Z lme $
#
# PROVIDE: consuld
# REQUIRE: LOGIN FILESYSTEMS
# KEYWORD: shutdown
. /etc/rc.subr
name="consuld"
desc="A highly available and distributed service discovery and KV store"
rcvar="consuld_enable"
command="consul agent -server -bootstrap-expect=1 \
-data-dir=/tmp/consul -node=agent-one -bind=172.20.20.10 \
-config-dir=/etc/consul.d"
pidfile="/var/run/${name}.pid"
start_precmd=consuld_prestart
ftpd_prestart()
{
rc_flags="-D ${rc_flags}"
return 0
}
load_rc_config $name
run_rc_command "$1"
  • nat is not a recommended approach for autopilot
  • Investigate if this is a best practice or actually blocked.
  • create similar startup agent for the jail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment