Browse Source

Show factory reset screen

Bob Mottram 10 months ago
parent
commit
87904f6938
2 changed files with 8 additions and 5 deletions
  1. 7 0
      src/freedombone-distro
  2. 1 5
      webadmin/EN/factory_resetting.html

+ 7 - 0
src/freedombone-distro

@@ -32,6 +32,13 @@ PROJECT_NAME='freedombone'
 export TEXTDOMAIN=${PROJECT_NAME}-distro
 export TEXTDOMAINDIR="/usr/share/locale"
 
+# show the factory reset screen
+local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local
+webadmin_install_dir="/var/www/${local_hostname}/htdocs/admin"
+if [ -f "${webadmin_install_dir}/factory_resetting.html" ]; then
+    cp "${webadmin_install_dir}/factory_resetting.html" "${webadmin_install_dir}/index.html"
+fi
+
 if [ -f /root/.manualinstall ]; then
     rm /root/.manualinstall
 fi

+ 1 - 5
webadmin/EN/factory_resetting.html

@@ -42,15 +42,11 @@
   </head>
   <body>
     <div class="header">
-      <a href="index.html" title="Go Back"><img id="headerpic" class="img-responsive" src="images/logo.png" alt="Go Back"></a>
+      <a href="index.html" title="Go Back"><img id="headerpic" class="img-responsive" src="images/logo.png"></a>
 
       <h3 translate="yes">Factory reset is in progress</h3>
 
       <br>
-
-      <form action="index.html">
-        <input type="submit" translate="yes" value="Go Back" />
-      </form>
     </div>
 
   </body>