Vitalpbx releasenote V2.2

De SLM - MediaWiki

Retour

V2.2 - Version MSATA

Update

Mise à jours en version 3.1.3-1

Console

Modification du grub afin d'activer le port ttyS0,115200n8 au démarrage.

nano /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap text quiet console=ttyS0,115200n8"
GRUB_DISABLE_RECOVERY="true"
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Intégration carte openvox

https://www.openvox.cn/pub/documents/manuals/B400E_BE400E_on_DAHDI_User_Manual.pdf

yum install pciutils bison bison-devel ncurses ncurses-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-c++ libxml2 libxml2-devel
wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.11.5.tar.gz
tar -zxvf libpri-1.4.11.5.tar.gz
wget http://downloads.openvox.cn/pub/drivers/dahdi-linux-complete/openvox_dahdi-linux-complete-current.tar.gz
wget http://downloads.openvox.cn/pub/drivers/dahdi-linux-complete/openvox_dahdi-linux-complete-current.tar.gz --no-check-certificate
tar -xvzf openvox_dahdi-linux-complete-current.tar.gz

Monitoring

Installation Proxy Zabbix + Agent

Zabbix_Agent_VitalPBX_proxy

Correction

Beep

Changement de la version du programme "beep" suite à une incompatibilité avec le démarrage en mode console

Mise à jour du wiki

DynHost

Création Tache Dynhost

Motd

Lors de mise à jour, le motd tiscom est écrasé par celui vital pbx

nano /etc/profile.d/tiscomwelcome.sh
#!/bin/bash
#Bash Colour Codes
green="\033[00;32m"
txtrst="\033[00;0m"
bleu="\033[1;34m"

if [ -f /etc/redhat-release ]; then
        linux_ver=`cat /etc/redhat-release`
        vitalpbx_ver=`rpm -qi vitalpbx |awk -F: '/^Version/ {print $2}'`
        vitalpbx_release=`rpm -qi vitalpbx |awk -F: '/^Release/ {print $2}'`
elif [ -f /etc/debian_version ]; then
        linux_ver="Debian "`cat /etc/debian_version`
        vitalpbx_ver=`dpkg -l vitalpbx |awk '/ombutel/ {print $3}'`
else
        linux_ver=""
        vitalpbx_ver=""
        vitalpbx_release=""
fi

vpbx_version="${vitalpbx_ver}-${vitalpbx_release}"

echo -e "
${bleu}
 _______  _                             __       __     _
|__   __|(_)                            \ \     / /    (_)
   | |    _   __   ___  ___   _ __ ___   \ \   / /___   _   ___  ___
   | |   | |/ __| / __|/ _ \ | '_ ' _ \   \ \ / // _ \ | | / __|/ _ \ 
   | |   | |\__ \| (__| (_) || | | | | |   \ V /| (_) || || (__|  __/
   |_|   |_||___/ \___|\___/ |_| |_| |_|    \_/  \___/ |_| \___|\___|
${txtrst}

 Version IPBX     : ${vpbx_version//[[:space:]]}
 Version Asterisk : `asterisk -rx "core show version" 2>/dev/null| grep -ohe 'Asterisk [0-9.]*'`
 Version Linux    : ${linux_ver}
 Nom de domaine   : `hostname`
 Dispo depuis     : `uptime | grep -ohe 'up .*' | sed 's/up //g' | awk -F "," '{print $1}'`
 Charcge CPU      : `uptime | grep -ohe 'load average[s:][: ].*' | awk '{ print "Last Minute: " $3" Last 5 Minutes: "$4" Last 15 Minutes: "$5 }'`
 Utilisateurs     : `uptime | grep -ohe '[0-9.*] user[s,]'`
 Adresse(s) IP    : ${bleu}`ip addr | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' | xargs`${txtrst}
 Heure courante   :`timedatectl | sed -n '/Local time/ s/^[ \t]*Local time:\(.*$\)/\1/p'`
 Syncro NTP       :`timedatectl |awk -F: '/NTP sync/ {print $2}'`

"

Création d'un script afin de le jouer au démarrage

nano /var/lib/vitalpbx/scripts/boot.sh
#!/bin/bash
## Supprime le motd vitalpbx si existe
if [ -e /etc/profile.d/vitalwelcome.sh ]
then
    rm -f /etc/profile.d/vitalwelcome.sh
    echo "vitalwelcome.sh a été supprimé"
fi

Donner au script des droits d’exécution

chmod +x /var/lib/vitalpbx/scripts/boot.sh

Créer une nouveau service systemd

nano /etc/systemd/system/SLM_boot.service
[Unit]
Description=Lancement d'un script au démarrage du serveur
After=network.target

[Service]
Type=simple
ExecStart=/var/lib/vitalpbx/scripts/boot.sh
TimeoutStartSec=0

[Install]
WantedBy=default.target

Reloader le process systemd pour que notre nouveau service soit pris en compte:

systemctl daemon-reload

“Activer” le service pour qu’il se lance automatiquement au démarrage de la machine:

systemctl enable SLM_boot.service

Tester

cp /etc/profile.d/tiscomwelcome.sh /etc/profile.d/vitalwelcome.sh 
systemctl reboot