Last active
December 11, 2015 05:49
-
-
Save atl/4555239 to your computer and use it in GitHub Desktop.
Minimal initialization script to set up Trac in the Joyent Public Cloud
This file contains 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
#!/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