Comment repeupler ou reconstruire /etc/asterisk
après avoir purgé asterisk
et supprimé manuellement le répertoire?
thufir@mordor:~$
thufir@mordor:~$ Sudo apt-get purge asterisk asterisk-mp3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
asterisk* asterisk-mp3* asterisk-voicemail*
0 upgraded, 0 newly installed, 3 to remove and 306 not upgraded.
After this operation, 5,345 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 271591 files and directories currently installed.)
Removing asterisk-voicemail (1:13.1.0~dfsg-1.1ubuntu3) ...
Removing asterisk-mp3 (1:13.1.0~dfsg-1.1ubuntu3) ...
Removing asterisk (1:13.1.0~dfsg-1.1ubuntu3) ...
Purging configuration files for asterisk (1:13.1.0~dfsg-1.1ubuntu3) ...
dpkg: warning: while removing asterisk, directory '/var/spool/asterisk/monitor' not empty so not removed
Processing triggers for man-db (2.7.4-1) ...
thufir@mordor:~$
thufir@mordor:~$ Sudo rm -rf /etc/asterisk/
thufir@mordor:~$
thufir@mordor:~$ Sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm freetds-common
libiksemel3 libjansson4 libpj2 libpjlib-util2 libpjmedia-audiodev2 libpjmedia2 libpjnath2 libpjsip-simple2 libpjsip-ua2 libpjsip2
libresample1 libsqlite0 libsybdb5
0 upgraded, 0 newly installed, 19 to remove and 306 not upgraded.
After this operation, 17.5 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 271402 files and directories currently installed.)
Removing asterisk-config (1:13.1.0~dfsg-1.1ubuntu3) ...
Removing asterisk-core-sounds-en (1.4.22-1) ...
Removing asterisk-core-sounds-en-gsm (1.4.22-1) ...
Removing asterisk-modules (1:13.1.0~dfsg-1.1ubuntu3) ...
Removing asterisk-moh-opsound-gsm (2.03-1) ...
Removing libsybdb5:AMD64 (0.91-6.1) ...
Removing freetds-common (0.91-6.1) ...
Removing libiksemel3:AMD64 (1.4-2) ...
Removing libjansson4:AMD64 (2.7-1ubuntu1) ...
Removing libpjsip-ua2 (2.1.0.0.ast20130823-1) ...
Removing libpjsip-simple2 (2.1.0.0.ast20130823-1) ...
Removing libpjsip2 (2.1.0.0.ast20130823-1) ...
Removing libpjmedia2 (2.1.0.0.ast20130823-1) ...
Removing libpjnath2 (2.1.0.0.ast20130823-1) ...
Removing libpjlib-util2 (2.1.0.0.ast20130823-1) ...
Removing libpjmedia-audiodev2 (2.1.0.0.ast20130823-1) ...
Removing libresample1 (0.1.3-4) ...
Removing libsqlite0 (2.8.17-12fakesync1) ...
Removing libpj2 (2.1.0.0.ast20130823-1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for man-db (2.7.4-1) ...
thufir@mordor:~$
thufir@mordor:~$ Sudo apt-get install asterisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm asterisk-voicemail
freetds-common libiksemel3 libjansson4 libpj2 libpjlib-util2 libpjmedia-audiodev2 libpjmedia2 libpjnath2 libpjsip-simple2
libpjsip-ua2 libpjsip2 libresample1 libsqlite0 libsybdb5
Suggested packages:
asterisk-doc asterisk-dev asterisk-ooh323 asterisk-dahdi asterisk-vpb
The following NEW packages will be installed:
asterisk asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm
asterisk-voicemail freetds-common libiksemel3 libjansson4 libpj2 libpjlib-util2 libpjmedia-audiodev2 libpjmedia2 libpjnath2
libpjsip-simple2 libpjsip-ua2 libpjsip2 libresample1 libsqlite0 libsybdb5
0 upgraded, 21 newly installed, 0 to remove and 306 not upgraded.
Need to get 0 B/8,796 kB of archives.
After this operation, 22.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Selecting previously unselected package libiksemel3:AMD64.
(Reading database ... 270371 files and directories currently installed.)
Preparing to unpack .../libiksemel3_1.4-2_AMD64.deb ...
Unpacking libiksemel3:AMD64 (1.4-2) ...
Selecting previously unselected package libjansson4:AMD64.
Preparing to unpack .../libjansson4_2.7-1ubuntu1_AMD64.deb ...
Unpacking libjansson4:AMD64 (2.7-1ubuntu1) ...
Selecting previously unselected package asterisk-config.
Preparing to unpack .../asterisk-config_1%3a13.1.0~dfsg-1.1ubuntu3_all.deb ...
Unpacking asterisk-config (1:13.1.0~dfsg-1.1ubuntu3) ...
Selecting previously unselected package libpj2.
Preparing to unpack .../libpj2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpj2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libpjlib-util2.
Preparing to unpack .../libpjlib-util2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpjlib-util2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libpjmedia-audiodev2.
Preparing to unpack .../libpjmedia-audiodev2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpjmedia-audiodev2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libpjnath2.
Preparing to unpack .../libpjnath2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpjnath2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libpjmedia2.
Preparing to unpack .../libpjmedia2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpjmedia2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libpjsip2.
Preparing to unpack .../libpjsip2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpjsip2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libpjsip-simple2.
Preparing to unpack .../libpjsip-simple2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpjsip-simple2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libpjsip-ua2.
Preparing to unpack .../libpjsip-ua2_2.1.0.0.ast20130823-1_AMD64.deb ...
Unpacking libpjsip-ua2 (2.1.0.0.ast20130823-1) ...
Selecting previously unselected package libresample1.
Preparing to unpack .../libresample1_0.1.3-4_AMD64.deb ...
Unpacking libresample1 (0.1.3-4) ...
Selecting previously unselected package libsqlite0.
Preparing to unpack .../libsqlite0_2.8.17-12fakesync1_AMD64.deb ...
Unpacking libsqlite0 (2.8.17-12fakesync1) ...
Selecting previously unselected package freetds-common.
Preparing to unpack .../freetds-common_0.91-6.1_all.deb ...
Unpacking freetds-common (0.91-6.1) ...
Selecting previously unselected package libsybdb5:AMD64.
Preparing to unpack .../libsybdb5_0.91-6.1_AMD64.deb ...
Unpacking libsybdb5:AMD64 (0.91-6.1) ...
Selecting previously unselected package asterisk-modules.
Preparing to unpack .../asterisk-modules_1%3a13.1.0~dfsg-1.1ubuntu3_AMD64.deb ...
Unpacking asterisk-modules (1:13.1.0~dfsg-1.1ubuntu3) ...
Selecting previously unselected package asterisk-core-sounds-en-gsm.
Preparing to unpack .../asterisk-core-sounds-en-gsm_1.4.22-1_all.deb ...
Unpacking asterisk-core-sounds-en-gsm (1.4.22-1) ...
Selecting previously unselected package asterisk-core-sounds-en.
Preparing to unpack .../asterisk-core-sounds-en_1.4.22-1_all.deb ...
Unpacking asterisk-core-sounds-en (1.4.22-1) ...
Selecting previously unselected package asterisk.
Preparing to unpack .../asterisk_1%3a13.1.0~dfsg-1.1ubuntu3_AMD64.deb ...
Unpacking asterisk (1:13.1.0~dfsg-1.1ubuntu3) ...
Selecting previously unselected package asterisk-voicemail.
Preparing to unpack .../asterisk-voicemail_1%3a13.1.0~dfsg-1.1ubuntu3_AMD64.deb ...
Unpacking asterisk-voicemail (1:13.1.0~dfsg-1.1ubuntu3) ...
Selecting previously unselected package asterisk-moh-opsound-gsm.
Preparing to unpack .../asterisk-moh-opsound-gsm_2.03-1_all.deb ...
Unpacking asterisk-moh-opsound-gsm (2.03-1) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...
Setting up libiksemel3:AMD64 (1.4-2) ...
Setting up libjansson4:AMD64 (2.7-1ubuntu1) ...
Setting up asterisk-config (1:13.1.0~dfsg-1.1ubuntu3) ...
Setting up libpj2 (2.1.0.0.ast20130823-1) ...
Setting up libpjlib-util2 (2.1.0.0.ast20130823-1) ...
Setting up libpjmedia-audiodev2 (2.1.0.0.ast20130823-1) ...
Setting up libpjnath2 (2.1.0.0.ast20130823-1) ...
Setting up libpjmedia2 (2.1.0.0.ast20130823-1) ...
Setting up libpjsip2 (2.1.0.0.ast20130823-1) ...
Setting up libpjsip-simple2 (2.1.0.0.ast20130823-1) ...
Setting up libpjsip-ua2 (2.1.0.0.ast20130823-1) ...
Setting up libresample1 (0.1.3-4) ...
Setting up libsqlite0 (2.8.17-12fakesync1) ...
Setting up freetds-common (0.91-6.1) ...
Setting up libsybdb5:AMD64 (0.91-6.1) ...
Setting up asterisk-modules (1:13.1.0~dfsg-1.1ubuntu3) ...
Setting up asterisk-core-sounds-en-gsm (1.4.22-1) ...
Setting up asterisk-core-sounds-en (1.4.22-1) ...
update-alternatives: using /usr/share/asterisk/sounds/en_US_f_Allison to provide /usr/share/asterisk/sounds/en (asterisk-Prompt-en) in auto mode
update-alternatives: using /usr/share/asterisk/sounds/en_US_f_Allison to provide /usr/share/asterisk/sounds/en_US (asterisk-Prompt-en-us) in auto mode
Setting up asterisk (1:13.1.0~dfsg-1.1ubuntu3) ...
Adding system user for Asterisk
Adding user `asterisk' to group `dialout' ...
Adding user asterisk to group dialout
Done.
Adding user `asterisk' to group `audio' ...
Adding user asterisk to group audio
Done.
Setting up asterisk-voicemail (1:13.1.0~dfsg-1.1ubuntu3) ...
Setting up asterisk-moh-opsound-gsm (2.03-1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...
thufir@mordor:~$
thufir@mordor:~$
thufir@mordor:~$ Sudo ls /etc/asterisk/
manager.d
thufir@mordor:~$
Il manque des fichiers de configuration qui sont inclus immédiatement.
Cela fonctionnait dans une certaine mesure:
thufir@mordor:~$
thufir@mordor:~$ Sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm freetds-common
libiksemel3 libjansson4 libpj2 libpjlib-util2 libpjmedia-audiodev2 libpjmedia2 libpjnath2 libpjsip-simple2 libpjsip-ua2 libpjsip2
libresample1 libsqlite0 libsybdb5
0 upgraded, 0 newly installed, 19 to remove and 304 not upgraded.
After this operation, 17.5 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 271360 files and directories currently installed.)
Cependant, ne semble pas réellement fonctionner. Y a-t-il une configuration stockée ailleurs?
Les fichiers de /etc/asterisk
semblent être généralement expédiés par le package asterisk-config
. C'est donc ce paquet que vous devez purger. Votre retrait automatique a supprimé ce paquet, mais ne l'a pas purgé. Sudo apt-get --purge autoremove
l'aurait fait, mais maintenant qu'il est supprimé, dpkg -P asterisk-config
est nécessaire.
Il se peut que vous deviez également purger d’autres fichiers. La clé consiste à identifier le paquet contenant les fichiers que vous avez supprimés et à purger et réinstaller ces paquets.
La commande debsums -ec
(installez d'abord le package debsums
) vous indiquera quels conffiles ont été supprimés et quels packages les ont fournis, ce qui vous indique ce dont vous avez besoin de purger et de réinstaller. Alternativement, pour tout fichier, exécutez la commande dpkg -S file
afin de vous indiquer le paquet qui l’a fourni.