diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py
index 1d4d6a6..83ff05e 100644
--- a/qubesmanager/backup.py
+++ b/qubesmanager/backup.py
@@ -348,6 +348,12 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, multiselectwidget.QtGui.QWizard):
self.button(self.FinishButton).setEnabled(True)
self.showFileDialog.setEnabled(False)
self.cleanup_temporary_files()
+
+ # turn off only when backup was successful
+ if self.thread_monitor.success and \
+ self.turn_off_checkbox.isChecked():
+ os.system('systemctl poweroff')
+
signal.signal(signal.SIGCHLD, old_sigchld_handler)
def reject(self):
diff --git a/ui/backupdlg.ui b/ui/backupdlg.ui
index dc86b73..f4b0a0d 100644
--- a/ui/backupdlg.ui
+++ b/ui/backupdlg.ui
@@ -310,6 +310,28 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Other
+
+
+
-
+
+
+ Turn computer off after backup is finished
+
+
+
+
+
+