]> git.mjollnir.org Git - vserverctl.git/commitdiff
mahara profile (maybe not necessary anymore)
authorPenny Leach <penny@catalyst.net.nz>
Tue, 15 Apr 2008 02:55:20 +0000 (14:55 +1200)
committerPenny Leach <penny@catalyst.net.nz>
Tue, 15 Apr 2008 02:55:20 +0000 (14:55 +1200)
profile/mahara/packages [new file with mode: 0644]
profile/mahara/post-vserver [new file with mode: 0644]
profile/mahara/pre-host [new file with mode: 0644]
profile/mahara/profile.conf [new file with mode: 0644]

diff --git a/profile/mahara/packages b/profile/mahara/packages
new file mode 100644 (file)
index 0000000..76c746f
--- /dev/null
@@ -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 (file)
index 0000000..d71e5e0
--- /dev/null
@@ -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 (file)
index 0000000..02f9ac4
--- /dev/null
@@ -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 (file)
index 0000000..90fe524
--- /dev/null
@@ -0,0 +1 @@
+parent               = php5