Commit 8012380c authored by Michael Große's avatar Michael Große Committed by Addshore
Browse files

Dev: Print nice message after mediawiki install

parent 4d454ae6
...@@ -286,19 +286,23 @@ var mwddMediawikiInstallCmd = &cobra.Command{ ...@@ -286,19 +286,23 @@ var mwddMediawikiInstallCmd = &cobra.Command{
"/var/www/html/w/LocalSettings.php.mwdd.tmp", "/var/www/html/w/LocalSettings.php.mwdd.tmp",
}, exec.HandlerOptions{}, "root") }, exec.HandlerOptions{}, "root")
var serverLink string = "http://" + DbName + ".mediawiki.mwdd.localhost:" + mwdd.DefaultForUser().Env().Get("PORT")
const adminUser string = "admin"
const adminPass string = "mwddpassword"
// Do a DB type dependant install, writing the output LocalSettings.php to /tmp // Do a DB type dependant install, writing the output LocalSettings.php to /tmp
if DbType == "sqlite" { if DbType == "sqlite" {
mwdd.DefaultForUser().Exec("mediawiki", []string{ mwdd.DefaultForUser().Exec("mediawiki", []string{
"php", "php",
"/var/www/html/w/maintenance/install.php", "/var/www/html/w/maintenance/install.php",
"--confpath", "/tmp", "--confpath", "/tmp",
"--server", "http://" + DbName + ".mediawiki.mwdd.localhost:" + mwdd.DefaultForUser().Env().Get("PORT"), "--server", serverLink,
"--dbtype", DbType, "--dbtype", DbType,
"--dbname", DbName, "--dbname", DbName,
"--lang", "en", "--lang", "en",
"--pass", "mwddpassword", "--pass", adminPass,
"docker-" + DbName, "docker-" + DbName,
"admin", adminUser,
}, exec.HandlerOptions{}, "nobody") }, exec.HandlerOptions{}, "nobody")
} }
if DbType == "mysql" { if DbType == "mysql" {
...@@ -318,16 +322,16 @@ var mwddMediawikiInstallCmd = &cobra.Command{ ...@@ -318,16 +322,16 @@ var mwddMediawikiInstallCmd = &cobra.Command{
"php", "php",
"/var/www/html/w/maintenance/install.php", "/var/www/html/w/maintenance/install.php",
"--confpath", "/tmp", "--confpath", "/tmp",
"--server", "http://" + DbName + ".mediawiki.mwdd.localhost:" + mwdd.DefaultForUser().Env().Get("PORT"), "--server", serverLink,
"--dbtype", DbType, "--dbtype", DbType,
"--dbuser", "root", "--dbuser", "root",
"--dbpass", "toor", "--dbpass", "toor",
"--dbname", DbName, "--dbname", DbName,
"--dbserver", DbType, "--dbserver", DbType,
"--lang", "en", "--lang", "en",
"--pass", "mwddpassword", "--pass", adminPass,
"docker-" + DbName, "docker-" + DbName,
"admin", adminUser,
}, exec.HandlerOptions{}, "nobody") }, exec.HandlerOptions{}, "nobody")
} }
...@@ -345,6 +349,14 @@ var mwddMediawikiInstallCmd = &cobra.Command{ ...@@ -345,6 +349,14 @@ var mwddMediawikiInstallCmd = &cobra.Command{
"--wiki", DbName, "--wiki", DbName,
"--quick", "--quick",
}, exec.HandlerOptions{}, "nobody") }, exec.HandlerOptions{}, "nobody")
fmt.Println("")
fmt.Println("***************************************")
fmt.Println("Installation successfull 🎉")
fmt.Println("User: " + adminUser)
fmt.Println("Pass: " + adminPass)
fmt.Println("Link: " + serverLink)
fmt.Println("***************************************")
}, },
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment