Skip to content

Commit

Permalink
add delegated setup
Browse files Browse the repository at this point in the history
  • Loading branch information
drscream committed Aug 4, 2014
1 parent 451bd8e commit 358a367
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions copy/var/zoneinit/includes/05-delegated-dataset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
UUID=$(mdata-get sdc:uuid)
DDS=zones/${UUID}/data

if zfs list ${DDS} 1>/dev/null 2>&1; then
zfs create ${DDS}/www || true
zfs create ${DDS}/mysql || true

zfs set mountpoint=/var/www ${DDS}/www
zfs set mountpoint=/var/mysql ${DDS}/mysql
fi
9 changes: 9 additions & 0 deletions customize
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ rm /opt/local/etc/httpd/{\
httpd-userdir.conf,\
httpd-vhosts.conf}

# Remove unused mysql stuff from base
echo "* Remove unused mysql stuff from base"
rm -r /var/mysql/*

# Copy phpmyadmin example config
echo "* Copy phpmyadmin example config"
mkdir /opt/local/etc/httpd/conf.d
cp /opt/local/share/examples/phpmyadmin/apache.conf /opt/local/etc/httpd/conf.d/80-phpmyadmin.conf

echo "* Cleaning up"
rm -rf /root/*
sm-prepare-image -y

0 comments on commit 358a367

Please sign in to comment.