Afox Posted October 16, 2021 Share Posted October 16, 2021 Hallo, gibt es eine Möglichkeit mehreren Domains auf einmal z.B. eine weitere IP zuzuordnen ohne jede einzeln bearbeiten zu müssen? Danke und lG, Afox Link to comment Share on other sites More sharing options...
0 d00p Posted October 16, 2021 Share Posted October 16, 2021 Von aus aus nicht, schreib dir halt ein kleines scriptchen was die API nutzt. Link to comment Share on other sites More sharing options...
0 Afox Posted October 16, 2021 Author Share Posted October 16, 2021 Ich bin auf dieses Thema gestoßen: Dort gibt es ein Beispiel für curl: curl --location --request POST 'https://MYDOMAIN/api.php' \ --header 'Content-Type: application/json' \ --data-raw '{ "header": { "apikey": "MYAPIKEY", "secret": "MYSECRET" }, "body": { "command": "Froxlor.listFunctions" } }' Meine Frage lautet nun wie ich das für den Befehl "Domains.update" umbaue. Den Command auszutauschen bekomme ich noch hin aber bei den weiteren Parametern weiß ich nicht wie man die einträgt. Meine Vermutung lautet ich benötige "id" oder "domainname" zur Identifizierung und den Array "ipandport" bzw. "ssl_ipandport". Link to comment Share on other sites More sharing options...
0 d00p Posted October 16, 2021 Share Posted October 16, 2021 schau dir doch einfach die examples im git-repo an: https://github.com/Froxlor/Froxlor/blob/master/doc/example/ Das sollte einen guten start ermöglichen Link to comment Share on other sites More sharing options...
0 Afox Posted October 16, 2021 Author Share Posted October 16, 2021 Ich versuche mal zu lösen "body": { "command": "Domains.update", "params": { "id": "###", "ipandport": {"###","###"} } } Über ein richtig oder falsch würde ich mich freuen bzw. eine kleine Korrektur falls nicht komplett falsch. Link to comment Share on other sites More sharing options...
0 Afox Posted October 16, 2021 Author Share Posted October 16, 2021 Also der Befehl hat bis auf die ipandport-Zeile gestimmt. Dort muss es eine eckige Klammer sein ["###","###"]. Ein Problem habe ich allerdings durch das mehrmalige Ausführen des Befehls erhalten: Quote "status": 500, "status_message": "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '#domainid#-2' for key 'PRIMARY'", "data": null Link to comment Share on other sites More sharing options...
0 d00p Posted October 16, 2021 Share Posted October 16, 2021 4 minutes ago, Afox said: "status_message": "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '#domainid#-2' for key 'PRIMARY'", jo du versuchst die gleiche IP mehrfach einer domain hinzuzufügen, erlaubt die datenbank nicht Link to comment Share on other sites More sharing options...
Question
Afox
Hallo,
gibt es eine Möglichkeit mehreren Domains auf einmal z.B. eine weitere IP zuzuordnen ohne jede einzeln bearbeiten zu müssen?
Danke und lG,
Afox
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now