 -                            li $msg
 -                        }
 -                    }
+-
+-                    division {class="j_forcedUpdate" style="padding:10px;"} {
+-                      puts "<br/>\${dialogSettingsCMHintSoftwareUpdate3}"
+-                    }
 +                    puts "RaspberryMatic is a community driven project. If you want to support it, please consider a <a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RAQSDY9YNZVCL' target='_blank'>PayPal donation</a> to support further development.<br><br><a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RAQSDY9YNZVCL' target='_blank'><img alt='PayPal' border=0 src='https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif'></a>"
 +                    #puts "\${dialogSettingsCMHintSoftwareUpdate1}"
 +                    #number_list {class="j_noForcedUpdate"} {

--- homematic/WebUI/www/config/cp_maintenance.cgi.orig	2017-03-21 13:52:40.253500448 +0100
+++ homematic/WebUI/www/config/cp_maintenance.cgi	2017-03-21 13:53:12.704702906 +0100
@@ -377,7 +377,7 @@
                                         table_row {
                                             table_data {

+                    #        li $msg
+                    #    }
+                    #}
+
+                    #division {class="j_forcedUpdate" style="padding:10px;"} {
+                    #  puts "<br/>\${dialogSettingsCMHintSoftwareUpdate3}"
+                    #}
                 }
             }
             table_row {class="CLASS20902 j_noForcedUpdate j_fwUpdateOnly"} {
@@ -467,6 +469,21 @@
                     puts "\${dialogSettingsCMHintRestart}"
                 }
             }
+            table_row {class="CLASS20902 j_noForcedUpdate j_fwUpdateOnly"} {
+                table_data {class="CLASS20903"} $styleMaxWidth {
+                    puts "Shutdown"
+                }
+                table_data {class="CLASS20904"} {
+                    division {class="popupControls CLASS20905"} {
+                        division {class="CLASS20910"} {onClick="OnShutdown();"} {
+                            puts "Shutdown"
+                        }
+                    }
+                }
+                table_data {align="left"} {class="CLASS20904"} {
+                    puts "Will properly shutdown RaspberryMatic and save all settings beforehand."
+                }
+            }
             
             # Abgesicherter Modus
             table_row {class="CLASS20902 j_noForcedUpdate j_fwUpdateOnly"} {
@@ -647,6 +664,12 @@
                 dlgPopup.LoadFromFile(url, "action=reboot_confirm");
             }
             
+            OnShutdown = function() {
+                dlgPopup.hide();
+                dlgPopup.setWidth(400);
+                dlgPopup.LoadFromFile(url, "action=shutdown_confirm");
+            }
+            
             OnEnterSafeMode = function() {
               new YesNoDialog(translateKey("dialogSafetyCheck"), translateKey("dialogQuestionRestartSafeMode"), function(result) {
                 if (result == YesNoDialog.RESULT_YES)
@@ -860,6 +883,89 @@
     }
 }
 
+proc action_shutdown_confirm {} {
+   global env
+   
+    http_head
+    division {class="popupTitle"} {
+        puts "\${dialogSafetyCheck}"
+    }
+    division {class="CLASS20900"} {
+        table {class="popupTable CLASS20901"} {border="1"} {
+            table_row {
+                table_data {
+                    table {class="CLASS20909"} {width="100%"} {
+                        table_row {
+                            table_data {colspan="3"} {
+			        puts "Please confirm the shutdown."
+                            }
+                        }                        
+                        table_row {
+                            table_data {align="right"} {class="CLASS20911"} {colspan="3"} {
+                                division {class="popupControls CLASS20905"} {
+                                    division {class="CLASS20910"} {onClick="OnNextStep()"} {
+                                        puts "Shutdown"
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    division {class="popupControls"} {
+        table {
+            table_row {
+                table_data {class="CLASS20907"} {
+                    division {class="CLASS20908"} {onClick="dlgPopup.hide();showMaintenanceCP();"} {
+                        puts "\${btnCancel}"
+                    }
+                }
+            }
+        }
+    }
+    puts ""
+    cgi_javascript {
+        puts "var url = \"$env(SCRIPT_NAME)?sid=\" + SessionId;"
+        puts {
+            OnNextStep = function() {
+                regaMonitor.stop();
+                InterfaceMonitor.stop();
+                dlgPopup.hide();
+                dlgPopup.setWidth(400);
+                dlgPopup.LoadFromFile(url, "action=shutdown_go");
+            }
+        }
+        puts "dlgPopup.readaptSize();"
+        puts "translatePage('#messagebox')"
+    }
+}
+
+proc action_shutdown_go {} {
+    global env
+    cd /tmp/
+    
+    http_head
+
+    put_message "\${dialogPerformRebootTitle}" {
+        ${dialogPerformRebootContent}
+    } {"\${btnNewLogin}" "window.location.href='/';"}
+
+    puts ""
+    cgi_javascript {
+        puts "var url = \"$env(SCRIPT_NAME)?sid=\" + SessionId;"
+        puts {
+            var pb = "action=shutdown";
+            var opts = {
+                postBody: pb,
+                sendXML: false
+            };
+            new Ajax.Request(url, opts);
+        }
+    }
+}
+
 proc action_update_start {} {
     catch { exec killall hss_lcd }
     catch { exec lcdtool {Saving     Data...    } }
@@ -878,8 +984,17 @@
     catch { exec lcdtool {Saving     Data...    } }
     rega system.Save()
     catch { exec lcdtool {Reboot...             } }
+    exec sleep 5
     exec /sbin/reboot
 }
+proc action_shutdown {} {
+    catch { exec killall hss_lcd }
+    catch { exec lcdtool {Saving     Data...    } }
+    rega system.Save()
+    catch { exec lcdtool {Shutdown...           } }
+    exec sleep 5
+    exec /sbin/poweroff
+}
 
 proc get_logserver {} {
     return [read_var //etc/config/syslog LOGHOST]
