Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eadba4af3f | ||
|
|
e3f22e8e0b | ||
|
|
40e36e0423 | ||
|
|
65a62ca0e4 | ||
|
|
accec47d08 | ||
|
|
6c74e09203 |
No files matched your search
+9
-1
@@ -201,12 +201,17 @@ for fpm_svc in /lib/systemd/system/php*-fpm.service /usr/lib/systemd/system/php*
|
||||
cat << 'EOF_OVERRIDE' > "/etc/systemd/system/${svc_name}.d/override.conf"
|
||||
[Service]
|
||||
ProtectSystem=false
|
||||
ReadWritePaths=/etc/asterisk /etc/fail2ban /etc/nginx /var/log /var/lib/asterisk /var/spool/asterisk /var/www /usr/local/bin /etc/sudoers.d
|
||||
ReadWritePaths=/etc/asterisk /etc/fail2ban /etc/nginx /var/log /var/lib/asterisk /var/spool/asterisk /var/www /usr/local/bin /etc/sudoers.d /etc/letsencrypt /var/lib/letsencrypt
|
||||
EOF_OVERRIDE
|
||||
fi
|
||||
done
|
||||
systemctl daemon-reload
|
||||
|
||||
# Répertoires Let's Encrypt et permissions pour Asterisk / Web
|
||||
mkdir -p /etc/letsencrypt /var/log/letsencrypt /var/lib/letsencrypt
|
||||
chgrp -R asterisk /etc/letsencrypt 2>/dev/null || true
|
||||
chmod -R g+rX /etc/letsencrypt 2>/dev/null || true
|
||||
|
||||
# Configuration des limites d'upload PHP (Restauration d'archives 512 Mo & Sons volumineux)
|
||||
for php_dir in /etc/php/*; do
|
||||
if [ -d "$php_dir/fpm/conf.d" ]; then
|
||||
@@ -329,6 +334,9 @@ for lang in fr en es; do
|
||||
if [ -d "/usr/share/asterisk/sounds/$lang" ] && [ ! -e "/var/lib/asterisk/sounds/$lang" ]; then
|
||||
ln -sf "/usr/share/asterisk/sounds/$lang" "/var/lib/asterisk/sounds/$lang"
|
||||
fi
|
||||
if [ -d "/var/lib/asterisk/sounds/$lang" ] && [ ! -e "/var/lib/asterisk/sounds/$lang/custom" ]; then
|
||||
ln -sf /var/lib/asterisk/sounds/custom "/var/lib/asterisk/sounds/$lang/custom" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
if [ ! -e "/usr/share/asterisk/sounds/custom" ]; then
|
||||
ln -sf /var/lib/asterisk/sounds/custom /usr/share/asterisk/sounds/custom 2>/dev/null || true
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ try {
|
||||
$installedVerData = file_exists("{$appDir}/version.json")
|
||||
? json_decode((string)file_get_contents("{$appDir}/version.json"), true)
|
||||
: [];
|
||||
$installedVer = $installedVerData['version'] ?? '1.4.8';
|
||||
$installedVer = $installedVerData['version'] ?? '1.5.0';
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ $companyLogo = trim($branding['company_logo'] ?? '');
|
||||
$hasBranding = !empty($companyName) || !empty($companyLogo);
|
||||
|
||||
$appVerData = file_exists(__DIR__ . '/../version.json') ? json_decode((string)file_get_contents(__DIR__ . '/../version.json'), true) : [];
|
||||
$appVersion = $appVerData['version'] ?? '1.4.8';
|
||||
$appVersion = $appVerData['version'] ?? '1.5.0';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr" class="h-full">
|
||||
|
||||
+6
-1
@@ -57,7 +57,9 @@ echo "-> Droits applicatifs et ACL POSIX (/etc/asterisk et /var/www/nexus-pbx)..
|
||||
usermod -aG asterisk www-data 2>/dev/null || true
|
||||
usermod -aG www-data asterisk 2>/dev/null || true
|
||||
|
||||
mkdir -p /var/www/nexus-pbx/public/avatars /var/www/nexus-pbx/storage/sounds /var/www/nexus-pbx/storage/backups /var/www/nexus-pbx/storage/system_backups
|
||||
mkdir -p /var/www/nexus-pbx/public/avatars /var/www/nexus-pbx/storage/sounds /var/www/nexus-pbx/storage/backups /var/www/nexus-pbx/storage/system_backups /etc/letsencrypt /var/log/letsencrypt /var/lib/letsencrypt
|
||||
chgrp -R asterisk /etc/letsencrypt 2>/dev/null || true
|
||||
chmod -R g+rX /etc/letsencrypt 2>/dev/null || true
|
||||
chown -R www-data:asterisk /var/www/nexus-pbx
|
||||
chmod 2775 /var/www/nexus-pbx/storage /var/www/nexus-pbx/storage/backups /var/www/nexus-pbx/storage/system_backups /var/www/nexus-pbx/storage/sounds /var/www/nexus-pbx/public/avatars 2>/dev/null || true
|
||||
|
||||
@@ -107,6 +109,9 @@ for lang in fr en es; do
|
||||
if [ -d "/usr/share/asterisk/sounds/$lang" ] && [ ! -e "/var/lib/asterisk/sounds/$lang" ]; then
|
||||
ln -sf "/usr/share/asterisk/sounds/$lang" "/var/lib/asterisk/sounds/$lang" 2>/dev/null || true
|
||||
fi
|
||||
if [ -d "/var/lib/asterisk/sounds/$lang" ] && [ ! -e "/var/lib/asterisk/sounds/$lang/custom" ]; then
|
||||
ln -sf /var/lib/asterisk/sounds/custom "/var/lib/asterisk/sounds/$lang/custom" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
if [ ! -e "/usr/share/asterisk/sounds/custom" ]; then
|
||||
ln -sf /var/lib/asterisk/sounds/custom /usr/share/asterisk/sounds/custom 2>/dev/null || true
|
||||
|
||||
@@ -96,6 +96,9 @@ echo -e "${C_GRAY}[2/6] Déploiement des nouveaux fichiers de code...${C_RESET}"
|
||||
git reset --hard FETCH_HEAD 2>/dev/null || git reset --hard "${GIT_REMOTE}/${GIT_BRANCH}"
|
||||
chown -R www-data:asterisk "$APP_DIR" 2>/dev/null || true
|
||||
chmod 2775 "$APP_DIR/storage" "$APP_DIR/storage/backups" "$APP_DIR/storage/sounds" 2>/dev/null || true
|
||||
mkdir -p /etc/letsencrypt /var/log/letsencrypt /var/lib/letsencrypt 2>/dev/null || true
|
||||
chgrp -R asterisk /etc/letsencrypt 2>/dev/null || true
|
||||
chmod -R g+rX /etc/letsencrypt 2>/dev/null || true
|
||||
chmod +x "$APP_DIR/scripts/update.sh" "$APP_DIR/scripts/nexus-firewall" "$APP_DIR/scripts/nexus-banner.sh" 2>/dev/null || true
|
||||
|
||||
# Liens symboliques CLI (non-bloquants si exécuté sous sandbox PHP ProtectSystem)
|
||||
@@ -140,6 +143,9 @@ for lang in fr en es; do
|
||||
if [ -d "/usr/share/asterisk/sounds/$lang" ] && [ ! -e "/var/lib/asterisk/sounds/$lang" ]; then
|
||||
ln -sf "/usr/share/asterisk/sounds/$lang" "/var/lib/asterisk/sounds/$lang" 2>/dev/null || true
|
||||
fi
|
||||
if [ -d "/var/lib/asterisk/sounds/$lang" ] && [ ! -e "/var/lib/asterisk/sounds/$lang/custom" ]; then
|
||||
ln -sf /var/lib/asterisk/sounds/custom "/var/lib/asterisk/sounds/$lang/custom" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
if [ ! -e "/usr/share/asterisk/sounds/custom" ]; then
|
||||
ln -sf /var/lib/asterisk/sounds/custom /usr/share/asterisk/sounds/custom 2>/dev/null || true
|
||||
|
||||
@@ -265,8 +265,9 @@ class CertificateManager
|
||||
|
||||
$stagingFlag = $staging ? '--test-cert' : '';
|
||||
|
||||
// Exécution de Certbot webroot non-interactive (Clé RSA 2048 universellement compatible téléphones IP Yealink/Fanvil/Grandstream)
|
||||
$cmd = "certbot certonly --webroot -w {$escWebroot} -d {$escDomain} --non-interactive --agree-tos -m {$escEmail} --keep-until-expiring --key-type rsa --rsa-key-size 2048 {$stagingFlag} 2>&1";
|
||||
// Exécution de Certbot webroot non-interactive avec sudo (Clé RSA 2048 universellement compatible téléphones IP Yealink/Fanvil/Grandstream)
|
||||
$hookCmd = escapeshellarg("chgrp -R asterisk /etc/letsencrypt 2>/dev/null; chmod -R g+rX /etc/letsencrypt 2>/dev/null || true");
|
||||
$cmd = "sudo /usr/bin/certbot certonly --webroot -w {$escWebroot} -d {$escDomain} --non-interactive --agree-tos -m {$escEmail} --keep-until-expiring --key-type rsa --rsa-key-size 2048 --post-hook {$hookCmd} {$stagingFlag} 2>&1";
|
||||
|
||||
$output = [];
|
||||
$exitCode = 0;
|
||||
@@ -444,7 +445,8 @@ class CertificateManager
|
||||
$domain = $cert['primary_domain'];
|
||||
$escDomain = escapeshellarg($domain);
|
||||
|
||||
$cmd = "certbot renew --cert-name {$escDomain} --force-renewal 2>&1";
|
||||
$hookCmd = escapeshellarg("chgrp -R asterisk /etc/letsencrypt 2>/dev/null; chmod -R g+rX /etc/letsencrypt 2>/dev/null || true");
|
||||
$cmd = "sudo /usr/bin/certbot renew --cert-name {$escDomain} --force-renewal --post-hook {$hookCmd} 2>&1";
|
||||
$output = [];
|
||||
$exitCode = 0;
|
||||
exec($cmd, $output, $exitCode);
|
||||
|
||||
+11
-2
@@ -256,6 +256,9 @@ class ConfigGenerator
|
||||
$lines[] = "type = aor";
|
||||
$lines[] = "max_contacts = {$maxContacts}";
|
||||
$lines[] = "remove_existing = yes";
|
||||
$lines[] = "default_expiration = 120";
|
||||
$lines[] = "maximum_expiration = 300";
|
||||
$lines[] = "minimum_expiration = 60";
|
||||
$lines[] = "qualify_frequency = 30";
|
||||
if ($hasVm) {
|
||||
$lines[] = "mailboxes = {$num}@default";
|
||||
@@ -2219,18 +2222,24 @@ class ConfigGenerator
|
||||
$stmt = $this->db->prepare('SELECT slug FROM sounds WHERE id = :id');
|
||||
$stmt->execute([':id' => (int)$soundRef]);
|
||||
$slug = $stmt->fetchColumn();
|
||||
return $slug ? "custom/{$slug}" : $fallback;
|
||||
return $slug ? "/var/lib/asterisk/sounds/custom/{$slug}" : $fallback;
|
||||
}
|
||||
$ref = trim((string)$soundRef);
|
||||
if (str_starts_with($ref, 'sound-')) {
|
||||
return $this->resolveSoundFile(substr($ref, 6), $fallback);
|
||||
}
|
||||
if (str_starts_with($ref, 'custom/')) {
|
||||
return "/var/lib/asterisk/sounds/{$ref}";
|
||||
}
|
||||
if (str_starts_with($ref, '/var/lib/asterisk/sounds/custom/')) {
|
||||
return $ref;
|
||||
}
|
||||
if (!str_contains($ref, '/') && !in_array($ref, ['demo-instruct', 'demo-echotest', 'pbx-invalid', 'hello-world', 'beep', 'silence/1', 'vm-goodbye'])) {
|
||||
$stmt = $this->db->prepare('SELECT slug FROM sounds WHERE slug = :slug OR name = :name');
|
||||
$stmt->execute([':slug' => $ref, ':name' => $ref]);
|
||||
$slug = $stmt->fetchColumn();
|
||||
if ($slug) {
|
||||
return "custom/{$slug}";
|
||||
return "/var/lib/asterisk/sounds/custom/{$slug}";
|
||||
}
|
||||
}
|
||||
return $ref ?: $fallback;
|
||||
|
||||
@@ -235,6 +235,9 @@ class SystemChecker
|
||||
if (is_dir($src) && !file_exists($dst)) {
|
||||
@symlink($src, $dst);
|
||||
}
|
||||
if (is_dir($dst) && !file_exists("{$dst}/custom")) {
|
||||
@symlink('/var/lib/asterisk/sounds/custom', "{$dst}/custom");
|
||||
}
|
||||
}
|
||||
if (!file_exists('/usr/share/asterisk/sounds/custom')) {
|
||||
@symlink('/var/lib/asterisk/sounds/custom', '/usr/share/asterisk/sounds/custom');
|
||||
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"version": "1.4.8",
|
||||
"version": "1.5.2",
|
||||
"codename": "Helios",
|
||||
"release_date": "2026-11-04",
|
||||
"min_php_version": "8.2",
|
||||
"changelog": [
|
||||
"Correction du routage des codes de test direct SVI/IVR (*801, *802...) et suppression des conflits de préfixe avec l'interphonie (*80) et l'interception de groupe (*8)",
|
||||
"Restauration automatique des liens de médiathèque audio Debian (/usr/share/asterisk/sounds/fr -> /var/lib/asterisk/sounds) sur toute installation fraîche",
|
||||
"Définition systématique de la langue française dans les contextes SVI (CHANNEL(language)=fr) pour une lecture parfaite des annonces système",
|
||||
"Amélioration de la robustesse de l'interphonie 1-à-1 avec ciblage strict des postes"
|
||||
"Correction de l'émission et du renouvellement Let's Encrypt / Certbot ACME (privilèges sudo et permissions d'accès aux certificats)",
|
||||
"Plafond d'expiration d'enregistrement SIP standard (maximum_expiration = 300s, default = 120s) garantissant la reconnexion automatique rapide de tous les postes (1 à 3 min)",
|
||||
"Nettoyage et isolation stricte des sauvegardes (base NexusPBX, sons, spools voicemail, certificats)",
|
||||
"Résolution définitive et propre des conflits de préfixes Dialplan sur les SVI/IVR (*801-*899)"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user