FireEvent "On demand" from opsi-script
FireEvent "On demand" from opsi-script
To follow up on this resolved request, Is there a way to call a FireEvent "On demand" from within a script ?
All this In order to trigger install of products with the actionRequest property at "setup" on the client running the script without rebooting.
Re: FireEvent "On demand" from script
yeah its pretty simple
Code: Alles auswählen
opsi-admin method hostControlSafe_fireEvent on_demand $CLIENTID
Mathias
Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.
Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.
uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de
Re: FireEvent "On demand" from script
I may not have explained myself correctly.
I mean from an opsi-script script running on the client.
As we can trigger pending installations from systray, I would like to do this from an opsi-script script.
If you look at the linked post, I'm trying to install different bundles of packages right after the first deployment of the opsi-agent depending on the destination of the computer (currently the host group).
Re: FireEvent "On demand" from script
So therefore you can call the on_demand rpc call with the client name as a parameter.
Regards
Mathias
Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.
Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.
uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de
Re: FireEvent "On demand" from script
I used this :
Code: Alles auswählen
[OpsiServiceCall_fireEventOnDemand]
"method": "hostControlSafe_fireEvent"
"params": [
"on_demand",
"%HostID%"
]
Code: Alles auswählen
[3] [2022-06-14 15:38:04.702] [master] Error: retrieveJSONObject --- opsi service problem ----> {"message":"Backend permission denied error: Access to method 'hostControlSafe_fireEvent' denied for user 'myHost.domain.tld'","class":"BackendPermissionDeniedError"}
(168) [3] [2022-06-14 15:38:04.702] [master] Received (first 512): {"id":1,"error":{"message":"Backend permission denied error: Access to method 'hostControlSafe_fireEvent' denied for user 'myHost.domain.tld'","class":"BackendPermissionDeniedError"},"result":null}
(169) [3] [2022-06-14 15:38:04.703] [master] Error: -> {"message":"Backend permission denied error: Access to method 'hostControlSafe_fireEvent' denied for user 'myHost.domain.tld'","class":"BackendPermissionDeniedError"}
EDIT: I replaced real hostid by "myHost.domain.tld"
Re: FireEvent "On demand" from opsi-script
Somebody could help on this ?
Is there a trick to get permission to call method 'hostControlSafe_fireEvent' from opsi-script ?
What is the way used by systray to fire pending installs ? Can we reproduce this in opsi-script ?
Re: FireEvent "On demand" from opsi-script
with opsi 4.2 we made a lot of changes to ACLs. You might want to take a look and change them to your needs.
Regards
Mathias
Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.
Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.
uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de