This function deletes a reseller and all of the reseller's cPanel accounts.
Warning:
unsetupreseller
function.HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ terminatereseller \ user='username' \ terminatereseller='1'
{- "data": {
- "acct": [
- {
- "output": {
- "raw": "Running pre removal script (/usr/local/cpanel/scripts/prekillacct)......DoneCollecting\nDomain Name and IP...User: example Domain: example.com\n...DoneLocking account and setting shell to nologin...Locking\npassword for user example. passwd: Success ...DoneKilling\nall processes owned by user......DoneRemoving\nSessions.........DoneRemoving Suspended Info.........DoneCleaning\nVirtfs.........DoneRemoving Web Logs......DoneRemoving\nBandwidth Files......DoneRemoving Email Sending\nLimits Cache......DoneRemoving DKIM keys......DoneRemoving\nCrontab......DoneRemoving HTTP Virtual Hosts...Removed\nthe following non-SSL virtual hosts: example.com\nRemoved the following SSL virtual hosts: ...DoneRemoving\nftp Virtual Hosts......Done Removing user''''s\nweb content directory symlinks......DoneRemoving\nMySQL databases and users......DoneRemoving PostgreSQL\ndatabases and users......DoneRemoving User & Group.......Success...Done\nRemoving DNS Entries...example.com => deleted\nfrom hostname. ...Done Removing Email Setup...Removing\n/etc/valiases/example.com ...Done Removing mailman\nlists......Done Updating Databases......Done Removing\nbandwidth limits......Done Removing Counter Data......Done\nAdding IP back to the IP address pool...System\nhas 3 free ips. ...Done Removing user''''s cPanel\nDatabases & Updating......Done Reloading Services......Done\nRemoving mail and service configs... ...Done Removing\nLogaholic Webstats...Id: TQ:TaskQueue:129 ...Done\nSending Contacts......Done Updating internal databases...Updating\nftp passwords for example Purging ftp user example\nFtp password files updated. Ftp vhost passwords\nsynced ...Done Running post removal scripts (/usr/local/cpanel/scripts/legacypostkillacct,\n/usr/local/cpanel/scripts/postkillacct)......Done\nAccount Removal Complete!!!...example account\nremoved...Done\n"
}, - "reason": "username account removed",
- "result": 1,
- "user": "username"
}
]
}, - "metadata": {
- "command": "terminatereseller",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}