Fix: Installer bricht bei nicht-kritischen Fehlern nicht mehr ab
- || true für Services (postfix, dovecot, redis, nginx) - || true für artisan config/route/view:cache - npm run build: Warnung statt Abbruch, Hinweis zum manuellen Nachholen - Monit ist bereits aktiviert (systemctl enable --now) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
e833ab72c6
commit
3c8eaa16df
16
installer.sh
16
installer.sh
|
|
@ -279,7 +279,7 @@ CONF
|
|||
chown root:postfix /etc/postfix/sql/mysql-virtual-alias-maps.cf
|
||||
chmod 640 /etc/postfix/sql/mysql-virtual-alias-maps.cf
|
||||
|
||||
systemctl enable --now postfix
|
||||
systemctl enable --now postfix || true
|
||||
|
||||
# ===== Dovecot konfigurieren (IMAP/POP3 + SSL) =====
|
||||
log "Dovecot konfigurieren…"
|
||||
|
|
@ -358,7 +358,7 @@ ssl_cert = <${CERT}
|
|||
ssl_key = <${KEY}
|
||||
CONF
|
||||
|
||||
systemctl enable --now dovecot
|
||||
systemctl enable --now dovecot || true
|
||||
|
||||
# ===== Rspamd & OpenDKIM =====
|
||||
log "Rspamd + OpenDKIM aktivieren…"
|
||||
|
|
@ -385,7 +385,7 @@ CONF
|
|||
systemctl enable --now opendkim || true
|
||||
|
||||
# ===== Redis =====
|
||||
systemctl enable --now redis-server
|
||||
systemctl enable --now redis-server || true
|
||||
|
||||
# ===== Nginx: Laravel vHost (80/443) =====
|
||||
log "Nginx konfigurieren…"
|
||||
|
|
@ -455,7 +455,7 @@ server {
|
|||
}
|
||||
CONF
|
||||
ln -sf ${NGINX_SITE} ${NGINX_SITE_LINK}
|
||||
nginx -t && systemctl enable --now nginx
|
||||
nginx -t && systemctl enable --now nginx || true
|
||||
|
||||
# ===== Node/NPM installieren (für Vite/Tailwind Build) =====
|
||||
log "Node/NPM installieren…"
|
||||
|
|
@ -543,15 +543,15 @@ log "App-Key generieren, Datenbank migrieren, Caches bauen…"
|
|||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan key:generate --force"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan migrate --force"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan storage:link --force || true"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan config:cache"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan route:cache"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan view:cache"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan config:cache" || true
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan route:cache" || true
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && php artisan view:cache" || true
|
||||
|
||||
# ===== Frontend Build =====
|
||||
if [ -f "${APP_DIR}/package.json" ]; then
|
||||
log "Frontend bauen…"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && npm ci --no-audit --no-fund || npm install"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && npm run build"
|
||||
sudo -u "$APP_USER" -H bash -lc "cd ${APP_DIR} && npm run build" || warn "npm run build fehlgeschlagen – manuell nachholen: cd ${APP_DIR} && npm run build"
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue