Commit a60c142d authored by Kulya's avatar Kulya 😊

Fix Bag perms with Telegram files

parent a56b3e9a
......@@ -14,6 +14,8 @@ read client_code
echo ${client_code}"tel" > /etc/hostname
yum install lame -y
LICADDR='https://bx24.alovoice.uz/lics/?client='${client_code}'&action='
BCODE=$(echo ${LICADDR} | base64)
......
......@@ -1174,7 +1174,7 @@ class AloVoiceConnector
$arAlvSections = array(
"dashboard" => array( "name" => "АлоВойс", "perms" => "all"),
"queues" => array( "name" => "Звонки", "perms" => "all"),
// "chdongles" => array( "name" => "GSM линии", "perms" => "admin"),
"chdongles" => array( "name" => "GSM линии", "perms" => "admin"),
"trunks" => array( "name" => "Линии", "perms" => "admin"),
"peers" => array( "name" => "Внут.номера", "perms" => "admin"),
// "stats" => array( "name" => "Статистика агентов", "perms" => "all"),
......
......@@ -694,9 +694,15 @@ when: "2021-02-02 01:35:54"
$tg_config = $this->tgdir."/confs/".$tgprofile;
$tg_socket = $this->tgdir."/socks/".$tgprofile.".sck";
if(is_dir($tg_profile_dir)){
$this->delTree($tg_profile_dir);
}
if(file_exists($tg_config)){
unlink($tg_config);
}
if(file_exists($tg_socket)){
unlink($tg_socket);
}
return array("answer"=>"deleted ".$tgNumber);
}
......@@ -713,6 +719,16 @@ when: "2021-02-02 01:35:54"
$oneTgProfile["name"] = (!empty($arProfile->print_name)) ? $arProfile->print_name : ''; //oneTgProfile["phone"];
$oneTgProfile["username"] = (!empty($arProfile->username)) ? $arProfile->username : '';
return $oneTgProfile;
{
"command": "exec /var/www/html/bx24/vendor/tg/src/telegram-cli -k /var/www/html/bx24/vendor/tg/src/server.pub -c /var/www/html/bx24/vendor/tg/src/confs/prf_998994412860 -vvv -p prf_998994412860",
"pid": 17570,
"running": false,
"signaled": false,
"stopped": false,
"exitcode": 126,
"termsig": 0,
"stopsig": 0
}
}
public function get_telegram_accounts(){
......@@ -1284,9 +1300,11 @@ when: "2021-02-02 01:35:54"
/*if(!file_exists($tg_bin)) {
copy($tgdir."/telegram-cli", $tg_bin);
}
chmod($tg_bin, 0777);
*/
*/
if(file_exists($tg_bin)) {
chmod($tg_bin, 0777);
}
if(!file_exists($tg_config)) {
file_put_contents($tg_config, "\n".$conf_profile_record."\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment