mirror of
https://github.com/myronblair/novacpx
synced 2026-06-30 17:50:41 -05:00
fix: CyberMail from field format + deploy runner syncs api/ and lib/
- Notifier.php + test-notify: use plain email address in 'from' field (CyberMail rejects "Name <email>" format) - deploy-runner.sh: rsync panel/api/ and panel/lib/ to web root after panel/public/ sync; also syncs panel/bin/ to /opt/novacpx/bin/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,14 @@ while IFS='|' read -r REPO_PATH WEB_ROOT COMMIT; do
|
|||||||
--exclude='*.log' \
|
--exclude='*.log' \
|
||||||
"$REPO_PATH/panel/public/" "$WEB_ROOT/" >> "$LOG" 2>&1
|
"$REPO_PATH/panel/public/" "$WEB_ROOT/" >> "$LOG" 2>&1
|
||||||
|
|
||||||
|
# Sync backend API and lib (not in panel/public, deployed separately)
|
||||||
|
rsync -av --delete --exclude='config.php' "$REPO_PATH/panel/api/" "$WEB_ROOT/api/" >> "$LOG" 2>&1
|
||||||
|
rsync -av --delete "$REPO_PATH/panel/lib/" "$WEB_ROOT/lib/" >> "$LOG" 2>&1
|
||||||
|
|
||||||
|
# Sync cron scripts to bin directory
|
||||||
|
rsync -av "$REPO_PATH/panel/bin/" /opt/novacpx/bin/ >> "$LOG" 2>&1
|
||||||
|
chmod +x /opt/novacpx/bin/*.php 2>/dev/null || true
|
||||||
|
|
||||||
# Run pending DB migrations
|
# Run pending DB migrations
|
||||||
MIGR_DIR="$REPO_PATH/db/migrations"
|
MIGR_DIR="$REPO_PATH/db/migrations"
|
||||||
if [[ -d "$MIGR_DIR" ]]; then
|
if [[ -d "$MIGR_DIR" ]]; then
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ match ($action) {
|
|||||||
if (!$apiKey) Response::error("No CyberMail API key configured");
|
if (!$apiKey) Response::error("No CyberMail API key configured");
|
||||||
|
|
||||||
$payload = json_encode([
|
$payload = json_encode([
|
||||||
'from' => "$fromName <$fromEmail>",
|
'from' => $fromEmail,
|
||||||
'to' => $to,
|
'to' => $to,
|
||||||
'subject' => 'NovaCPX — test notification',
|
'subject' => 'NovaCPX — test notification',
|
||||||
'html' => '<h2>Test Notification</h2><p>Email notifications are working correctly from your NovaCPX panel.</p>',
|
'html' => '<h2>Test Notification</h2><p>Email notifications are working correctly from your NovaCPX panel.</p>',
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Notifier {
|
|||||||
if (!$apiKey || !$to) return false;
|
if (!$apiKey || !$to) return false;
|
||||||
|
|
||||||
$payload = json_encode([
|
$payload = json_encode([
|
||||||
'from' => "$fromName <$fromEmail>",
|
'from' => $fromEmail,
|
||||||
'to' => $to,
|
'to' => $to,
|
||||||
'subject' => $subject,
|
'subject' => $subject,
|
||||||
'html' => $html,
|
'html' => $html,
|
||||||
|
|||||||
Reference in New Issue
Block a user