Page 2 of 2
Re: Restarting or shutting down workstations
Published: August 25, 2022 - 10:24
by alain17
dcardon wrote: ↑August 22, 2022 - 3:42 PM
Yes, it's only available with an enterprise license. If the menus aren't grayed out in the console, it's an error; we must have missed that when merging the enterprise and community code into a single binary.
So, since I'm on the Enterprise version, I'd be interested to know if my configuration is sufficient (and if it's a bug) or if I've missed something. The only computer I can restart or shut down is my own, which is running the console

Re: [SOLVED] Restarting or shutting down workstations
Published: August 25, 2022 - 10:52 AM
by florian777
So I used the package
TIS-WAPT-CONF-POLICY
which I modified to suit my needs and deployed on my client machines and it does its job perfectly.
Server: Windows 2016
WAPT: Company 2.2.1.11957
Re: [SOLVED] Restarting or shutting down workstations
Published: August 25, 2022 - 11:01
by alain17
Thank you Florian.
Unfortunately, even modifying the package didn't have the desired effect. I had to adapt the code using the following approach for it to finally work (without removing the parameters and the "default_global" section; my packages are installed, but the configuration file isn't updated):
Code: Select all
def install():
print("Applying WAPT Configuration Policy")
# Clean existing instructions
inifile_deleteoption(WAPT.config_filename, 'global', 'allow_remote_reboot')
inifile_deleteoption(WAPT.config_filename, 'global', 'allow_remote_shutdown')
inifile_deletesection(WAPT.config_filename, 'default_global')
# Editing wapt-get.ini of the WAPT Agent
inifile_writestring(WAPT.config_filename, 'global', 'allow_remote_reboot', 1)
inifile_writestring(WAPT.config_filename, 'global', 'allow_remote_shutdown', 1)
print("Reloading WAPT configuration")
WAPT.reload_config_if_updated()
What I find strange is that a "default_global" section keeps appearing in my configuration files and seems to loop back on itself (and isn't documented) to overwrite my values. Deleting it and reapplying the settings fixes it perfectly.
Server: Ubuntu Linux 20.04.4 LTS
WAPT: Enterprise 2.2.2.12388