Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - isaack

Pages: [1] 2
1
CWP API / MySQL User Pass Update
« on: October 25, 2020, 10:32:59 AM »
is it possible that the api can be extended in this point to update the password for an existing MySQL user?

2
CentOS 7 Problems / Add IP4
« on: October 21, 2020, 04:29:04 PM »
Hello,
I just wanted to store a second IP address in the CWP.
I used the IP Manager, which is located in the admin panel.
He creates the following file:

ifcfg-:1
with the following content

    DEVICE=:1
    TYPE=Ethernet
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=static
    IPADDR=5.199.130.204
    NETMASK=255.255.255.255
    GATEWAY=91.194.84.1

when I enter the command

    service network restart
    I get the following message
    [root@cpanel network-scripts]# service network restart
    Restarting network (via systemctl):
    ** (pkttyagent:19657): WARNING **: 18:17:04.966: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
    Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)
    [ OK ]

but with the command ifconfig I cannot see the new IP address

    [root@cpanel network-scripts]# ifconfig
    docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
    ether 02:42:80:6b:74:bf txqueuelen 0 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 0 bytes 0 (0.0 B)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    enp1s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 91.194.84.77 netmask 255.255.255.0 broadcast 91.194.84.255
    inet6 fe80::225:90ff:fee1:a1cc prefixlen 64 scopeid 0x20<link>
    ether 00:25:90:e1:a1:cc txqueuelen 1000 (Ethernet)
    RX packets 896454492 bytes 77246656595 (71.9 GiB)
    RX errors 0 dropped 121675 overruns 21 frame 0
    TX packets 328489556 bytes 321552938430 (299.4 GiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device memory 0xfea80000-feafffff
    enp1s0f1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    ether 00:25:90:e1:a1:cd txqueuelen 1000 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 0 bytes 0 (0.0 B)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device memory 0xfe980000-fe9fffff
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 28795464 bytes 8187828621 (7.6 GiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 28795464 bytes 8187828621 (7.6 GiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
    ether 52:54:00:d8:74:c8 txqueuelen 1000 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 0 bytes 0 (0.0 B)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Why?

3
How to / Re: Cronjob Problem
« on: February 05, 2020, 06:53:06 PM »
thanks thar works

4
How to / Cronjob Problem
« on: February 01, 2020, 09:23:40 AM »
Hello,
I have a problem with a cronjob.
I have entered the following with me:

Code: [Select]
/usr/local/bin/php -f /home/losebra/public_html/cron.php?id=3429&pw=demodmeo&rallys=Tagesklick
this is also called according to logfile. unfortunately nothing happens.

When I test this cron as described in the instructions via the ssh console, I get the following message:

Code: [Select]
Could not open input file: /home/losebra/public_html/cron.php?id=3429
Can someone help me here?

5
CentOS-WebPanel Bugs / Re: API Domain
« on: October 03, 2018, 11:36:02 AM »
no, since you can not see the source code yourself and therefore can not do anything, i just waited myself. nothing happened and you unfortunately get no answers here.
I now have another panel and have canceled the CWP.
you have to pay here apparently really, so that something happens and because I think mitlerweile that there is just as bad support as here in the forum, I switched to another panel, where everything works properly.

6
CentOS-WebPanel Bugs / Re: API Domain
« on: September 22, 2018, 10:53:41 AM »
Do not you get any answers here?
Do you really let the user just sit there on the problems?  >:( >:(

I would solve the problems myself. but that is unfortunately not possible by the encryption

7
CentOS-WebPanel Bugs / Re: API Domain
« on: September 18, 2018, 12:37:36 PM »
hello, I am now so far that it works.
it was because of my script that it really was not. please excuse this.

However, I have now found a mistake that does not come from me.

here is my code:
Code: [Select]
class Einrichten{
public function mysql_db($db_name){
$data = array(
"key" => KEY_MYSQL_DB,
"action"=>'add',
"user" => USER,
"database" => $db_name
);
$this->aufruf_api($data,"databasemysql");
}

public function mysql_user($userdb,$dbase){
$pass = create_code(10);
$data = array(
"key" => KEY_MYSQL_USER,
"action"=>'add',
"user" => USER,
"userdb" => $userdb,
"dbase" => $db_name,
"pass" => $pass,
"host" => 'Localhost'
);
$this->aufruf_api($data,"usermysql");
}

public function domain_add($domain){
$data = array(
"key" => KEY_DOMAIN_ADD,
"action" => 'add',
"user" => USER ,
"type" => 'domain',
"name" => $domain,
"path" => 'vms_suee/'
);
$this->aufruf_api($data,"admindomains");
}

protected function aufruf_api($data,$url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, DOMAIN .$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
echo curl_errno($ch);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response);
$this->response = $response;
}
}
and the following is the return from the server:

Code: [Select]
stdClass Object
(
    [status] => OK
    [msj] => Domain testweise.vms1-scripte.de was removed
)

permissions etc are all law

8
CentOS-WebPanel Bugs / Re: API Domain
« on: September 14, 2018, 08:13:27 PM »
is there no reaction?
pity, I still have no idea why this does not work with the domain.

9
CentOS-WebPanel Bugs / Re: API Domain
« on: September 12, 2018, 05:06:23 PM »
hello, yes, all permissions are set. list, add and del

10
CentOS-WebPanel Bugs / Re: API Domain
« on: September 12, 2018, 11:26:37 AM »
Sorry, this was my mistake. it should not be list but add there stand. so I have it in my code in it. with list everything goes without problems. There I also get the json code displayed.
the problem is with add.

11
CentOS-WebPanel Bugs / Re: API Domain
« on: September 11, 2018, 05:39:56 PM »
Unfortunately, I only get a white page. have looked with the firebug what happens, but unfortunately I get there only 500 errors and nothing more.
in the log file in /var/log/cwp/cwp_api.log is unfortunately only the following:
Code: [Select]
2018-09-11 17:39:11  grep <D9XdaLOAVitcvNzMN0dTySSpsESRwgE3lqqVrsHKLNPuw> /root/.conf/apikey
2018-09-11 17:39:11  authorized
the change to% has unfortunately brought no change.

12
CentOS-WebPanel Bugs / API Domain
« on: September 10, 2018, 07:20:45 PM »
Hallo,
ich bin leider jetzt erst dazu gekommen die Domain Funktion bei der Api zu testen.
leider muss ich feststellen, das der Server keine Antwort auf die Anfrage per Curl gibt.
Liegt das an meinem Code oder ist hier eventuell noch ein kleiner fehler im Script?

this is my code:

Code: [Select]
$data = array(
"key" => $key,
"action" => 'list',
"user" => 'isaack',
"type" => 'subdomain',
"name" => $domain,
"path" => 'public_html/vms-suee/'
);

$url = "https://91.194.84.77:2304/v1/admindomains";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
curl_close($ch);
$response = json_decode($response);
return $response;

13
Other / Re: Add domain with API
« on: September 09, 2018, 02:58:28 PM »
Thank you that it came with it.
I would be very committed to the fact that the e-mail administration is also possible via API.

14
Other / Re: Add domain with API
« on: August 03, 2018, 05:35:42 AM »
you mean the api manager?
I have already looked there, but have found nothing.
it's about assigning an existing user another domain.

15
Other / Add domain with API
« on: August 02, 2018, 12:54:21 PM »
Hello, I do not really know if I'm right here. At least I did not find anything else where you can write API questions purely.
Is it possible to add a domain with target directory via API for an existing user, if so which function should I use?

Thanks for the answers.

Pages: [1] 2