Hello,
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.
FireEvent "On demand" from opsi-script
FireEvent "On demand" from opsi-script
Zuletzt geändert von M4t am 15 Jun 2022, 14:45, insgesamt 1-mal geändert.
Opsi 4.2 - Rocky Linux 8
Re: FireEvent "On demand" from script
hi
yeah its pretty simple
Regards
Mathias
yeah its pretty simple
Code: Alles auswählen
opsi-admin method hostControlSafe_fireEvent on_demand $CLIENTID
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
Re: FireEvent "On demand" from script
Thank you very much,
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).
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).
Opsi 4.2 - Rocky Linux 8
Re: FireEvent "On demand" from script
You can use rpc calls in opsi-script.
So therefore you can call the on_demand rpc call with the client name as a parameter.
Regards
Mathias
So therefore you can call the on_demand rpc call with the client name as a parameter.
Regards
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
Re: FireEvent "On demand" from script
Very nice, thank you.
I used this :
But it seems that the client does not have sufficient permissions to call this backend method, here is the logs :
any idea ?
EDIT: I replaced real hostid by "myHost.domain.tld"
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"
Opsi 4.2 - Rocky Linux 8
Re: FireEvent "On demand" from opsi-script
Hello,
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 ?
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 ?
Opsi 4.2 - Rocky Linux 8
Re: FireEvent "On demand" from opsi-script
Hi,
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
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
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.