Explorar el Código

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

Dennis Rodewyk hace 7 años
padre
commit
99812025eb
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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" )