Jelajahi Sumber

Show option to restore service if backup is found in backup dir

Dennis Rodewyk 7 tahun lalu
induk
melakukan
99812025eb
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      data/include/functions/menu_functions.sh

+ 3 - 0
data/include/functions/menu_functions.sh

@@ -48,6 +48,9 @@ options_menu() {
 				&& $(ls -A "${ENV_DIR}"/static) ]] \
 				&& menu=( "Configure Site" "Manage Sites" "$exitmenu" ) \
 				|| menu=( "Configure Service" "$exitmenu" )
+			[[ "${BASE_DIR}"/data/backup/${SERVICE_NAME} ]] \
+				&& [[ $(ls -A "${BASE_DIR}"/data/backup/${SERVICE_NAME}) ]] \
+				&& insert menu "Restore Service" 1
 		elif ! elementInArray "${PROPER_NAME}" "${CONFIGURED_SERVICES[@]}" \
 		&& ! elementInArray "${PROPER_NAME}" "${INSTALLED_SERVICES[@]}";then
 			menu=( "Destroy \"${PROPER_NAME}\"" "$exitmenu" )