feat: scripts de projectos vindos do Hub (podcast, alojadamaria, clip, ocr, etc.)
Movidos do vault Hub para centralizar scripts. Hub mantem symlinks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+570
@@ -0,0 +1,570 @@
|
||||
#!/bin/bash
|
||||
|
||||
# =================================================================
|
||||
# COMANDOS DE INSTALACAO WiP - Websites Inteligentes e Poderosos
|
||||
# Versao: 3.0
|
||||
# Data: 24 Fevereiro 2026
|
||||
# Autor: Descomplicar - Emanuel Almeida
|
||||
# =================================================================
|
||||
#
|
||||
# IMPORTANTE: Este script corre no servidor CWP via SSH MCP
|
||||
# SEMPRE usar --allow-root (user shell e /usr/sbin/nologin no CWP)
|
||||
# Path base: /home/USER/dominio.pt (user CWP != nome dominio)
|
||||
#
|
||||
# Mudancas v3.0:
|
||||
# - Removido MainWP (descontinuado)
|
||||
# - Tema hello-elementor (era astra)
|
||||
# - fluentform no core (era wpforms-lite)
|
||||
# - Adicionado complianz-gdpr (GDPR, core)
|
||||
# - Adicionado clean-admin mu-plugin
|
||||
# - --allow-root obrigatorio em todos os comandos
|
||||
# - Removidos: wpvivid, bit-integrations, ai-engine, branda
|
||||
# =================================================================
|
||||
|
||||
# Cores para output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
log() { echo -e "${GREEN}[$(date +'%Y-%m-%d %H:%M:%S')] $1${NC}"; }
|
||||
warn() { echo -e "${YELLOW}[WARN] $1${NC}"; }
|
||||
err() { echo -e "${RED}[ERROR] $1${NC}"; }
|
||||
|
||||
# Helper: executa wp com flags obrigatorias
|
||||
wp_run() {
|
||||
local wp_path=$1
|
||||
shift
|
||||
wp "$@" --allow-root --path="$wp_path"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# SETUP WORDPRESS BASE
|
||||
# =================================================================
|
||||
setup_wordpress_base() {
|
||||
local domain=$1
|
||||
local wp_path=$2
|
||||
local admin_user=$3
|
||||
local admin_email=$4
|
||||
|
||||
log "Configurando WordPress base: $domain (path: $wp_path)"
|
||||
|
||||
# Download WordPress em PT-PT
|
||||
wp_run "$wp_path" core download --locale=pt_PT --skip-content
|
||||
|
||||
# Configurar wp-config
|
||||
wp_run "$wp_path" config create \
|
||||
--dbname="${domain//./_}_db" \
|
||||
--dbuser="$DB_USER" \
|
||||
--dbpass="$DB_PASS" \
|
||||
--dbhost="localhost"
|
||||
|
||||
# Instalar WordPress
|
||||
wp_run "$wp_path" core install \
|
||||
--url="https://$domain" \
|
||||
--title="$domain" \
|
||||
--admin_user="$admin_user" \
|
||||
--admin_password="$(openssl rand -base64 12)" \
|
||||
--admin_email="$admin_email" \
|
||||
--skip-email
|
||||
|
||||
# Configuracoes base Portugal
|
||||
wp_run "$wp_path" option update timezone_string 'Europe/Lisbon'
|
||||
wp_run "$wp_path" option update date_format 'd/m/Y'
|
||||
wp_run "$wp_path" option update time_format 'H:i'
|
||||
wp_run "$wp_path" option update start_of_week 1
|
||||
wp_run "$wp_path" option update blogdescription ''
|
||||
wp_run "$wp_path" option update default_comment_status 'closed'
|
||||
wp_run "$wp_path" option update comment_moderation 1
|
||||
|
||||
# Permalinks
|
||||
wp_run "$wp_path" rewrite structure '/%postname%/' --hard
|
||||
wp_run "$wp_path" rewrite flush
|
||||
|
||||
# Remover plugins e conteudo padrao
|
||||
wp_run "$wp_path" plugin delete hello akismet 2>/dev/null || true
|
||||
wp_run "$wp_path" post delete 1 2 --force 2>/dev/null || true
|
||||
wp_run "$wp_path" comment delete 1 --force 2>/dev/null || true
|
||||
|
||||
# Tema hello-elementor (sera activado com Elementor)
|
||||
wp_run "$wp_path" theme install hello-elementor --activate
|
||||
|
||||
log "WordPress base configurado para $domain"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# INSTALAR CORE WiP (TODOS OS PLANOS)
|
||||
# =================================================================
|
||||
install_core_wip() {
|
||||
local wp_path=$1
|
||||
|
||||
log "Instalando plugins core WiP..."
|
||||
|
||||
# Core Seguranca (3)
|
||||
wp_run "$wp_path" plugin install \
|
||||
wordfence \
|
||||
wp-security-audit-log \
|
||||
complianz-gdpr \
|
||||
--activate
|
||||
|
||||
# Core Performance (4)
|
||||
wp_run "$wp_path" plugin install \
|
||||
wp-fastest-cache \
|
||||
webp-express \
|
||||
insert-headers-and-footers \
|
||||
updraftplus \
|
||||
--activate
|
||||
|
||||
# Core Design (4 — elementor-free por defeito, tema ja activado)
|
||||
wp_run "$wp_path" plugin install \
|
||||
elementor \
|
||||
elementskit-lite \
|
||||
loco-translate \
|
||||
seo-by-rank-math \
|
||||
--activate
|
||||
|
||||
# Core Marketing (3)
|
||||
wp_run "$wp_path" plugin install \
|
||||
fluent-crm \
|
||||
fluent-smtp \
|
||||
fluentform \
|
||||
--activate
|
||||
|
||||
log "Core WiP instalado (15 plugins + tema)"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# MU-PLUGIN: DESCOMPLICAR CLEAN ADMIN
|
||||
# Remove banners promo do admin (Elementor, ElementsKit, etc.)
|
||||
# =================================================================
|
||||
install_clean_admin() {
|
||||
local wp_path=$1
|
||||
local clean_admin_src="${HOME}/.claude-work/descomplicar-clean-admin.php"
|
||||
local mu_plugins_dir="${wp_path}/wp-content/mu-plugins"
|
||||
|
||||
log "A instalar mu-plugin descomplicar-clean-admin..."
|
||||
|
||||
if [ ! -f "$clean_admin_src" ]; then
|
||||
warn "Ficheiro nao encontrado: $clean_admin_src"
|
||||
warn "Fazer download do repositorio antes de continuar."
|
||||
return 1
|
||||
fi
|
||||
|
||||
mkdir -p "$mu_plugins_dir"
|
||||
cp "$clean_admin_src" "${mu_plugins_dir}/descomplicar-clean-admin.php"
|
||||
|
||||
# Corrigir permissoes
|
||||
local cwp_user
|
||||
cwp_user=$(echo "$wp_path" | cut -d/ -f3)
|
||||
chown "${cwp_user}:${cwp_user}" "${mu_plugins_dir}/descomplicar-clean-admin.php"
|
||||
|
||||
log "mu-plugin clean-admin instalado em $mu_plugins_dir"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# CONFIGURAR WPFC (WP Fastest Cache)
|
||||
# A configuracao via SQL e necessaria — opcoes estao como JSON string
|
||||
# =================================================================
|
||||
configure_wpfc() {
|
||||
local wp_path=$1
|
||||
local db_prefix
|
||||
db_prefix=$(wp_run "$wp_path" config get table_prefix 2>/dev/null || echo "wp_")
|
||||
|
||||
log "Configurando WP Fastest Cache..."
|
||||
|
||||
local wpfc_config='{"is_mobile_theme":"","wpFastestCacheStatus":"on","wpFastestCacheSsl":"on","wpFastestCacheMobile":"on","wpFastestCacheLoggedInUsers":"on","wpFastestCacheNewPost":"on","wpFastestCacheUpdatePost":"on","wpFastestCacheByPass":"","wpFastestCacheRenderBlocking":"on","wpFastestCacheSmallImage":"","wpFastestCacheCombineCss":"on","wpFastestCacheCombineJs":"on","wpFastestCacheMinifyCss":"on","wpFastestCacheMinifyCssExclude":"","wpFastestCacheMinifyJs":"on","wpFastestCacheMinifyJsExclude":"","wpFastestCacheCDN":"","wpFastestCacheCDNexclude":"","wpFastestCacheLanguage":"","wpFastestCacheWordPress":""}'
|
||||
|
||||
wp_run "$wp_path" option update WpFastestCacheOptions "$wpfc_config"
|
||||
|
||||
log "WPFC configurado"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# INSTALAR TRADUCOES PT-PT
|
||||
# =================================================================
|
||||
install_translations() {
|
||||
local wp_path=$1
|
||||
local translations_src="/media/ealmeida/Dados/Dev/WordPress/Traducao-Plugins-PT-PT"
|
||||
|
||||
log "A instalar traducoes PT-PT..."
|
||||
|
||||
if [ ! -d "$translations_src" ]; then
|
||||
warn "Biblioteca de traducoes nao encontrada: $translations_src"
|
||||
warn "Instalar traducoes manualmente via Loco Translate."
|
||||
return 1
|
||||
fi
|
||||
|
||||
local loco_dir="${wp_path}/wp-content/languages/loco/plugins"
|
||||
mkdir -p "$loco_dir"
|
||||
|
||||
# Copiar ficheiros .po/.mo da biblioteca
|
||||
local count=0
|
||||
for po_file in "$translations_src"/**/*.po "$translations_src"/**/*.mo; do
|
||||
[ -f "$po_file" ] || continue
|
||||
cp "$po_file" "$loco_dir/"
|
||||
count=$((count + 1))
|
||||
done
|
||||
|
||||
local cwp_user
|
||||
cwp_user=$(echo "$wp_path" | cut -d/ -f3)
|
||||
chown -R "${cwp_user}:${cwp_user}" "$loco_dir"
|
||||
|
||||
log "Traducoes PT-PT instaladas ($count ficheiros)"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# OFERTA STARTER (~22 plugins)
|
||||
# =================================================================
|
||||
install_starter() {
|
||||
local domain=$1
|
||||
local wp_path=$2
|
||||
local admin_user=${3:-"admin"}
|
||||
local admin_email=${4:-"admin@descomplicar.pt"}
|
||||
|
||||
log "=== INSTALACAO STARTER: $domain ==="
|
||||
|
||||
setup_wordpress_base "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
install_core_wip "$wp_path"
|
||||
install_clean_admin "$wp_path"
|
||||
|
||||
# Plugins unicos Starter (7)
|
||||
log "Instalando plugins unicos Starter..."
|
||||
wp_run "$wp_path" plugin install \
|
||||
bdthemes-element-pack-lite \
|
||||
happy-elementor-addons \
|
||||
envato-elements \
|
||||
bit-integrations \
|
||||
bit-social \
|
||||
ai-engine \
|
||||
branda-white-labeling \
|
||||
--activate
|
||||
|
||||
configure_wpfc "$wp_path"
|
||||
install_translations "$wp_path"
|
||||
|
||||
# Corrigir permissoes finais
|
||||
local cwp_user
|
||||
cwp_user=$(echo "$wp_path" | cut -d/ -f3)
|
||||
chown -R "${cwp_user}:${cwp_user}" "$wp_path"
|
||||
|
||||
log "STARTER instalado (~22 plugins)"
|
||||
site_info "$wp_path"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# OFERTA CORPORATE (~28 plugins)
|
||||
# =================================================================
|
||||
install_corporate() {
|
||||
local domain=$1
|
||||
local wp_path=$2
|
||||
local admin_user=${3:-"admin"}
|
||||
local admin_email=${4:-"admin@descomplicar.pt"}
|
||||
|
||||
log "=== INSTALACAO CORPORATE: $domain ==="
|
||||
|
||||
install_starter "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
|
||||
log "Upgrade para CORPORATE..."
|
||||
|
||||
# Elementor Free -> Pro (instalar ZIP manualmente, nao esta em wp.org)
|
||||
warn "ATENCAO: Elementor Pro requer instalacao manual via ZIP."
|
||||
warn "Desactivar elementor free e instalar elementor-pro via admin ou WP-CLI upload."
|
||||
# wp_run "$wp_path" plugin install /caminho/elementor-pro.zip --activate
|
||||
|
||||
# bdthemes lite -> premium
|
||||
wp_run "$wp_path" plugin deactivate bdthemes-element-pack-lite
|
||||
wp_run "$wp_path" plugin delete bdthemes-element-pack-lite
|
||||
warn "ATENCAO: bdthemes-element-pack (premium) requer instalacao manual via ZIP."
|
||||
|
||||
# Adicionais Corporate
|
||||
wp_run "$wp_path" plugin install \
|
||||
google-site-kit \
|
||||
wp-event-solution \
|
||||
premium-addons-for-elementor \
|
||||
--activate
|
||||
|
||||
# happyfiles-pro: instalar via ZIP (premium)
|
||||
warn "ATENCAO: happyfiles-pro requer instalacao manual via ZIP."
|
||||
|
||||
# Corrigir permissoes
|
||||
local cwp_user
|
||||
cwp_user=$(echo "$wp_path" | cut -d/ -f3)
|
||||
chown -R "${cwp_user}:${cwp_user}" "$wp_path"
|
||||
|
||||
log "CORPORATE instalado (~28 plugins)"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# OFERTA CARE (~40 plugins)
|
||||
# =================================================================
|
||||
install_care() {
|
||||
local domain=$1
|
||||
local wp_path=$2
|
||||
local admin_user=${3:-"admin"}
|
||||
local admin_email=${4:-"admin@descomplicar.pt"}
|
||||
|
||||
log "=== INSTALACAO CARE: $domain ==="
|
||||
|
||||
install_corporate "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
|
||||
log "Adicionando funcionalidades CARE..."
|
||||
|
||||
# KiviCare (todos premium — instalar via ZIP)
|
||||
warn "ATENCAO: KiviCare requer instalacao manual via ZIP (5 plugins)."
|
||||
warn "Plugins: kivicare-clinic-management-system, kivicare-pro,"
|
||||
warn "kivicare-telemed-addon, kivicare-google-meet, kivicare-webhook-addon"
|
||||
|
||||
# Care custom
|
||||
wp_run "$wp_path" plugin install fluent-support click-to-chat-for-whatsapp --activate
|
||||
warn "Instalar via ZIP: care-notificacao-whatsms-main, sinc-care, sinccare-fatura"
|
||||
|
||||
# E-commerce light
|
||||
wp_run "$wp_path" plugin install \
|
||||
woocommerce \
|
||||
multibanco-ifthen-software-gateway-for-woocommerce \
|
||||
contribuinte-checkout \
|
||||
moloni \
|
||||
--activate
|
||||
|
||||
# Configuracoes WooCommerce PT
|
||||
wp_run "$wp_path" option update woocommerce_store_address 'Portugal'
|
||||
wp_run "$wp_path" option update woocommerce_currency 'EUR'
|
||||
wp_run "$wp_path" option update woocommerce_default_country 'PT'
|
||||
wp_run "$wp_path" option update woocommerce_calc_taxes 'yes'
|
||||
|
||||
# Corrigir permissoes
|
||||
local cwp_user
|
||||
cwp_user=$(echo "$wp_path" | cut -d/ -f3)
|
||||
chown -R "${cwp_user}:${cwp_user}" "$wp_path"
|
||||
|
||||
log "CARE instalado (~40 plugins)"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# OFERTA ECOMMERCE (~38 plugins)
|
||||
# =================================================================
|
||||
install_ecommerce() {
|
||||
local domain=$1
|
||||
local wp_path=$2
|
||||
local admin_user=${3:-"admin"}
|
||||
local admin_email=${4:-"admin@descomplicar.pt"}
|
||||
|
||||
log "=== INSTALACAO ECOMMERCE: $domain ==="
|
||||
|
||||
install_corporate "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
|
||||
log "Adicionando funcionalidades E-COMMERCE..."
|
||||
|
||||
# WooCommerce stack
|
||||
wp_run "$wp_path" plugin install \
|
||||
woocommerce \
|
||||
multibanco-ifthen-software-gateway-for-woocommerce \
|
||||
wholesalex \
|
||||
woo-save-abandoned-carts \
|
||||
money-manager \
|
||||
betterdocs \
|
||||
fluent-support \
|
||||
click-to-chat-for-whatsapp \
|
||||
--activate
|
||||
|
||||
# wpfunnels disponivel em wp.org (lite)
|
||||
wp_run "$wp_path" plugin install wpfunnels --activate
|
||||
warn "wpfunnels-pro e woocommerce-dashboard-stats: instalar via ZIP"
|
||||
|
||||
# Configuracoes WooCommerce PT
|
||||
wp_run "$wp_path" option update woocommerce_store_address 'Portugal'
|
||||
wp_run "$wp_path" option update woocommerce_currency 'EUR'
|
||||
wp_run "$wp_path" option update woocommerce_default_country 'PT'
|
||||
wp_run "$wp_path" option update woocommerce_calc_taxes 'yes'
|
||||
wp_run "$wp_path" option update woocommerce_enable_coupons 'yes'
|
||||
wp_run "$wp_path" option update woocommerce_manage_stock 'yes'
|
||||
|
||||
# Instalar paginas WooCommerce
|
||||
wp_run "$wp_path" wc tool run install_pages
|
||||
|
||||
# IVA Portugal
|
||||
wp_run "$wp_path" wc tax create --country=PT --rate=23 --name="IVA Normal" --class=standard
|
||||
wp_run "$wp_path" wc tax create --country=PT --rate=13 --name="IVA Intermedio" --class=reduced-rate
|
||||
wp_run "$wp_path" wc tax create --country=PT --rate=6 --name="IVA Reduzido" --class=zero-rate
|
||||
|
||||
# Corrigir permissoes
|
||||
local cwp_user
|
||||
cwp_user=$(echo "$wp_path" | cut -d/ -f3)
|
||||
chown -R "${cwp_user}:${cwp_user}" "$wp_path"
|
||||
|
||||
log "ECOMMERCE instalado (~38 plugins)"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# OFERTA CHALLENGE (~40+ plugins)
|
||||
# =================================================================
|
||||
install_challenge() {
|
||||
local domain=$1
|
||||
local wp_path=$2
|
||||
local sector=${3:-"general"}
|
||||
local admin_user=${4:-"admin"}
|
||||
local admin_email=${5:-"admin@descomplicar.pt"}
|
||||
|
||||
log "=== INSTALACAO CHALLENGE: $domain (Sector: $sector) ==="
|
||||
|
||||
install_ecommerce "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
|
||||
log "Adicionando funcionalidades CHALLENGE..."
|
||||
|
||||
# Migration & compliance
|
||||
wp_run "$wp_path" plugin install \
|
||||
product-import-export-for-woo \
|
||||
wpconsent-cookies-banner-privacy-suite \
|
||||
--activate
|
||||
|
||||
warn "fg-prestashop-to-woocommerce-premium: instalar via ZIP (plugin premium)"
|
||||
|
||||
# Plugins sector-especificos
|
||||
case $sector in
|
||||
"automotive"|"auto")
|
||||
log "Configurando para sector AUTOMOVEL..."
|
||||
# Plugins especificos automovel instalados conforme cliente
|
||||
;;
|
||||
"healthcare"|"saude")
|
||||
log "Configurando para sector SAUDE..."
|
||||
warn "Considerar instalar KiviCare (ver plano Care)"
|
||||
;;
|
||||
"education"|"educacao")
|
||||
log "Configurando para sector EDUCACAO..."
|
||||
wp_run "$wp_path" plugin install learnpress --activate
|
||||
;;
|
||||
*)
|
||||
log "Challenge generico — ajustar conforme cliente"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Corrigir permissoes
|
||||
local cwp_user
|
||||
cwp_user=$(echo "$wp_path" | cut -d/ -f3)
|
||||
chown -R "${cwp_user}:${cwp_user}" "$wp_path"
|
||||
|
||||
log "CHALLENGE instalado (~40+ plugins, sector: $sector)"
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# INFO SITE
|
||||
# =================================================================
|
||||
site_info() {
|
||||
local wp_path=$1
|
||||
|
||||
echo -e "${BLUE}=== INFORMACOES DO SITE ===${NC}"
|
||||
echo -e "${BLUE}Path: $wp_path${NC}"
|
||||
echo -e "${BLUE}WordPress: $(wp_run "$wp_path" core version 2>/dev/null)${NC}"
|
||||
echo -e "${BLUE}Tema activo: $(wp_run "$wp_path" theme list --status=active --field=name 2>/dev/null)${NC}"
|
||||
echo -e "${BLUE}Plugins activos: $(wp_run "$wp_path" plugin list --status=active --format=count 2>/dev/null)${NC}"
|
||||
echo -e "${BLUE}==============================${NC}"
|
||||
|
||||
echo -e "${YELLOW}Plugins activos:${NC}"
|
||||
wp_run "$wp_path" plugin list --status=active --format=table
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# MENU PRINCIPAL
|
||||
# =================================================================
|
||||
show_menu() {
|
||||
echo -e "${BLUE}"
|
||||
echo "=================================================="
|
||||
echo " WiP - Websites Inteligentes e Poderosos"
|
||||
echo " Instalador v3.0 (Fev 2026)"
|
||||
echo "=================================================="
|
||||
echo -e "${NC}"
|
||||
echo "1) Starter - Corporativo basico (~22 plugins)"
|
||||
echo "2) Corporate - Empresarial avancado (~28 plugins)"
|
||||
echo "3) Care - Sector saude (~40 plugins)"
|
||||
echo "4) E-commerce - Loja online completa (~38 plugins)"
|
||||
echo "5) Challenge - Especializado premium (~40+ plugins)"
|
||||
echo "6) Info site - Informacoes site existente"
|
||||
echo "7) Sair"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# MAIN
|
||||
# =================================================================
|
||||
main() {
|
||||
if ! command -v wp &> /dev/null; then
|
||||
err "WP-CLI nao encontrado. Verificar instalacao."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$DB_USER" ] || [ -z "$DB_PASS" ]; then
|
||||
err "Variaveis DB_USER e DB_PASS nao definidas."
|
||||
echo "Exportar antes de correr: export DB_USER=user DB_PASS=pass"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while true; do
|
||||
show_menu
|
||||
read -p "Escolha [1-7]: " choice
|
||||
|
||||
case $choice in
|
||||
1)
|
||||
read -p "Dominio (ex: cliente.pt): " domain
|
||||
read -p "Path completo (ex: /home/ealmeida/cliente.pt): " wp_path
|
||||
read -p "Admin user [admin]: " admin_user
|
||||
read -p "Admin email: " admin_email
|
||||
admin_user=${admin_user:-admin}
|
||||
install_starter "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
;;
|
||||
2)
|
||||
read -p "Dominio: " domain
|
||||
read -p "Path completo: " wp_path
|
||||
read -p "Admin user [admin]: " admin_user
|
||||
read -p "Admin email: " admin_email
|
||||
admin_user=${admin_user:-admin}
|
||||
install_corporate "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
;;
|
||||
3)
|
||||
read -p "Dominio: " domain
|
||||
read -p "Path completo: " wp_path
|
||||
read -p "Admin user [admin]: " admin_user
|
||||
read -p "Admin email: " admin_email
|
||||
admin_user=${admin_user:-admin}
|
||||
install_care "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
;;
|
||||
4)
|
||||
read -p "Dominio: " domain
|
||||
read -p "Path completo: " wp_path
|
||||
read -p "Admin user [admin]: " admin_user
|
||||
read -p "Admin email: " admin_email
|
||||
admin_user=${admin_user:-admin}
|
||||
install_ecommerce "$domain" "$wp_path" "$admin_user" "$admin_email"
|
||||
;;
|
||||
5)
|
||||
read -p "Dominio: " domain
|
||||
read -p "Path completo: " wp_path
|
||||
read -p "Sector [automotive/healthcare/education/general]: " sector
|
||||
read -p "Admin user [admin]: " admin_user
|
||||
read -p "Admin email: " admin_email
|
||||
sector=${sector:-general}
|
||||
admin_user=${admin_user:-admin}
|
||||
install_challenge "$domain" "$wp_path" "$sector" "$admin_user" "$admin_email"
|
||||
;;
|
||||
6)
|
||||
read -p "Path completo do site: " wp_path
|
||||
site_info "$wp_path"
|
||||
;;
|
||||
7)
|
||||
log "Saindo."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
err "Opcao invalida."
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
read -p "Pressione Enter para continuar..."
|
||||
clear
|
||||
done
|
||||
}
|
||||
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
main "$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user