Yes this is possible but you will need root access to the server to configure this.
You can do the above steps by using filters in Softaculous. Filters are PHP files which you can configure to execute your PHP function when a particular task is done in Softaculous. You can also execute shell commands using shell_exec or exec functions.