Skip to content

Instantly share code, notes, and snippets.

@atl
Last active December 11, 2015 05:49
Show Gist options
  • Save atl/4555239 to your computer and use it in GitHub Desktop.
Save atl/4555239 to your computer and use it in GitHub Desktop.
Minimal initialization script to set up Trac in the Joyent Public Cloud
#!/usr/bin/sh
# Install trac
/opt/local/bin/pkgin -y in trac
# set up the base directory (set as default by the SMF manifest)
/opt/local/bin/mkdir /trac
/opt/local/bin/chown www:www /trac
# configure a minimal base environment
/opt/local/bin/sudo -u www /opt/local/bin/trac-admin /trac/test initenv "Test environment" sqlite:db/trac.db
## The following is definitely not recommended for production:
## running a wiki with no access controls is just asking for trouble!
# change trac to listen on the public IP address:
PUBLIC=$(/usr/sbin/ifconfig -a | /opt/local/bin/grep -A 1 net0 | /opt/local/bin/awk '/inet/ { print $2 }');
/usr/sbin/svccfg -s trac:default setprop config/listen_ip=astring: $PUBLIC
/usr/sbin/svcadm refresh trac:default
/usr/sbin/svcadm restart trac:default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment