Disable Account disk quota “warn” percentage

rahnev

Well-Known Member
Jul 6, 2016
69
7
58
Bulgaria
cPanel Access Level
Root Administrator
Hello,
what is the right way to disable Account disk quota “warn” percentage tweak settings via API? I tried
Code:
whmapi1 set_tweaksetting key=emailusers_diskusage_warn_percent value=0
but output is
Code:
metadata:
  command: set_tweaksetting
  reason: Value must be a positive percentage float
  result: 0
  version: 1
Found the following notes, too:
1. If this value is 0 when your server validates the cpanel.config file, the system converts it to undef.
2. emailusers_diskusage_warn_percent:
label: 'Account disk quota “warn” percentage'
help: 'The disk quota percentage at which an account enters the “warn” state. An email notification will be sent to the user.'
undef: Disabled


So how can I set it to undef?

Thanks.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
Hey there! I reached out to the developers and confirmed there isn't an API call that can make this change. You can do this through the interface directly or you can just remove all entries after "system_diskusage_warn_percent" so there is no "=" or any value in the /var/cpanel/cpanel.config file.
 

rahnev

Well-Known Member
Jul 6, 2016
69
7
58
Bulgaria
cPanel Access Level
Root Administrator
Thanks for the explanation. Another question:

Is there a way to disable user disk usage notifications but admin notifications to be active? When "Account disk quota “warn” percentage" is set to Disabled, then "Notify admin or reseller when disk quota reaches “warn” state" is inactive and set to off.

Overall I want only admin/reseller receive notifications on disk usage warning and critical levels. Suggestions?