From: Penny Leach Date: Tue, 15 Apr 2008 02:55:20 +0000 (+1200) Subject: mahara profile (maybe not necessary anymore) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f5031b559321ab3ecf62f3bf943658edc07cd2df;p=vserverctl.git mahara profile (maybe not necessary anymore) --- diff --git a/profile/mahara/packages b/profile/mahara/packages new file mode 100644 index 0000000..76c746f --- /dev/null +++ b/profile/mahara/packages @@ -0,0 +1,4 @@ +php5 +php5-pgsql +php5-json +php5-gd diff --git a/profile/mahara/post-vserver b/profile/mahara/post-vserver new file mode 100644 index 0000000..d71e5e0 --- /dev/null +++ b/profile/mahara/post-vserver @@ -0,0 +1,2 @@ +mkdir /var/lib/mahara +chown www-data /var/lib/mahara diff --git a/profile/mahara/pre-host b/profile/mahara/pre-host new file mode 100644 index 0000000..02f9ac4 --- /dev/null +++ b/profile/mahara/pre-host @@ -0,0 +1,22 @@ +mkdir /etc/vservers/${VSNAME}/scripts -p +mkdir /vserver/${VSNAME}/data -p + +echo '/home' > /etc/vservers/${VSNAME}/namespace-cleanup-skip + +if [ -d /home/${PROFILEOPTION_username}/src/${VSNAME}/ ]; then + cat >/etc/vservers/${VSNAME}/scripts/pre-start << EOF + #!/bin/bash + mkdir -p /vserver/${VSNAME}/var/www/${VSNAME}/ + mount --bind /home/${PROFILEOPTION_username}/src/${VSNAME}/ /vserver/${VSNAME}/var/www/${VSNAME}/ + +EOF + chmod 755 /etc/vservers/${VSNAME}/scripts/pre-start + + cat >/etc/vservers/${VSNAME}/scripts/post-stop << EOF + #!/bin/bash + + umount /vserver/${VSNAME}/var/www/${VSNAME} +EOF + chmod 755 /etc/vservers/${VSNAME}/scripts/post-stop + +fi diff --git a/profile/mahara/profile.conf b/profile/mahara/profile.conf new file mode 100644 index 0000000..90fe524 --- /dev/null +++ b/profile/mahara/profile.conf @@ -0,0 +1 @@ +parent = php5