aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/planet/manifests/init.pp9
-rw-r--r--modules/planet/templates/index.php19
2 files changed, 28 insertions, 0 deletions
diff --git a/modules/planet/manifests/init.pp b/modules/planet/manifests/init.pp
index 24327d66..b737b66f 100644
--- a/modules/planet/manifests/init.pp
+++ b/modules/planet/manifests/init.pp
@@ -34,6 +34,15 @@ class planet {
mode => 644,
}
+ file { "index":
+ path => "/var/www/html/planet.$location/index.php",
+ ensure => present,
+ owner => planet,
+ group => apache,
+ mode => 755,
+ content => template("planet/index.php")
+ }
+
package { ['php-iconv']:
ensure => installed
}
diff --git a/modules/planet/templates/index.php b/modules/planet/templates/index.php
new file mode 100644
index 00000000..3a8b3534
--- /dev/null
+++ b/modules/planet/templates/index.php
@@ -0,0 +1,19 @@
+<html>
+<body>
+<h1>Planet Mageia</h1>
+<h3>Please choose one of the following locales:</h3>
+<ul>
+<?php
+function displayloc($path = ''){
+ return array_slice(scandir($path), 2);
+}
+
+foreach(displayloc('.') as $loc)
+ if(is_dir($loc))
+ {
+ echo '<li><a href="'.$loc.'">'.$loc.'</a></li>';
+ }
+?>
+</ul>
+</body>
+</html>