Skip to content
Snippets Groups Projects
Commit 9dbd4afe authored by Bob Mottram's avatar Bob Mottram
Browse files

Instruct to forward ports during install of standard version

parent 8f6e1349
No related branches found
No related tags found
No related merge requests found
......@@ -116,9 +116,7 @@
<img id="headerpic" class="img-responsive" src="images/logo.png" alt="Freedombone"><br>
<br>
<img id="domainicon" class="img-responsive" src="images/setupdomain.png" alt="Setup domain icon">
<p class="domaintext" translate="yes">Optionally you can specify a domain name which will be used for your email or XMPP address.</p>
<p class="domaintext" translate="yes">If you don't have a domain then just select Continue</p>
<p class="domaintext" translate="yes">Please specify a domain name which will be used for your email or XMPP address.</p>
<form action="setupdomain.php" method="post">
<p><input type="text" name="default_domain_name" autofocus></p>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
body {
margin: 0;
font-family: Arial;
background-color: white;
color: black;
}
#headerpic {
width: 60%;
height: auto;
margin-right : auto;
margin-left : auto;
min-width : 220px;
}
#domainicon {
width: 20%;
height: auto;
margin-right : auto;
margin-left : auto;
min-width : 100px;
}
.header {
text-align: center;
padding: 32px;
}
#iconpic {
width: 20%;
height: auto;
margin-right : auto;
margin-left : auto;
min-width : 120px;
}
.card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
max-width: 600px;
margin: auto;
text-align: center;
font-family: arial;
clear: both;
}
.card input[type=text] {
width: 90%;
clear: both;
text-align: center;
color: black;
background-color: lightblue;
}
.appurl {
color: grey;
font-size: 100%;
}
.welcomeheader {
font-size: 200%;
font-weight: bold;
}
.domaintext {
font-size: 90%;
}
button {
border: none;
outline: 0;
display: inline-block;
padding: 8px;
color: white;
background-color: #000;
text-align: center;
cursor: pointer;
width: 100%;
font-size: 18px;
}
a {
text-decoration: none;
}
button:hover, a:hover {
opacity: 0.7;
}
.chip {
display: inline-block;
padding: 0 25px;
height: 50px;
font-size: 70%;
line-height: 50px;
border-radius: 25px;
background-color: #f1f1f1;
}
.chip img {
float: left;
margin: 0 10px 0 -25px;
height: 50px;
width: 50px;
border-radius: 50%;
}
</style>
</head>
<body>
<div class="card">
<div class="header">
<img id="headerpic" class="img-responsive" src="images/logo.png" alt="Freedombone"><br>
<br>
<p class="domaintext" translate="yes">Please forward the following ports from your internet router:</p>
<p class="domaintext" translate="no">80, 443, 25, 465, 587</p>
<form action="setupportforward.php" method="post">
<input type="submit" name="setupportforward" translate="yes" value="Continue">
</form>
<br><br>
</div>
</div>
</body>
</html>
......@@ -40,14 +40,8 @@ if (isset($_POST['setupdomain'])) {
$domain_file = fopen(".temp_domain.txt", "w") or die("Unable to write to domain file");
fwrite($domain_file, $install_domain);
fclose($domain_file);
$output_filename = "setup_port_forward.html";
}
if(file_exists(".temp_setup.txt")) {
exec('mv .temp_setup.txt setup.txt');
exec('cp setup_installing.html index.html');
}
$output_filename = "setup_installing.html";
}
$htmlfile = fopen("$output_filename", "r") or die("Unable to open $output_filename");
......
<?php
// _____ _ _
// | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
// | __| _| -_| -_| . | . | | . | . | | -_|
// |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
//
// Freedom in the Cloud
//
// Reminder to forward ports from the internet router
//
// License
// =======
//
// Copyright (C) 2018-2019 Bob Mottram <bob@freedombone.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
$output_filename = "index.html";
if (php_sapi_name()!=='fpm-fcgi') exit('php script must be run from the web interface');
if (isset($_POST['setupportforward'])) {
if(file_exists(".temp_setup.txt")) {
exec('mv .temp_setup.txt setup.txt');
exec('cp setup_installing.html index.html');
}
$output_filename = "setup_installing.html";
}
$htmlfile = fopen("$output_filename", "r") or die("Unable to open $output_filename");
echo fread($htmlfile,filesize("$output_filename"));
fclose($htmlfile);
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment