Editing the adduser script
I'm working on getting cpanel account public_html directories mounted to an NFS. Right now, I have to manually add the individual accounts to this mount point. For future cPanel accounts I would like to edit the /scripts/adduser script to automatically create the mount point.
I am planning on writing a script that will do this, so what I would like to have the adduser script do is call the addmount script. I figure this can easily be added to the file. I also figure that when upcp runs it will overwrite any changes I make to the adduser script.
How can I get the changes I make to adduser from being lost whenever upcp runs?
I should probably also ask the same question about the killacct script as I would want it to automatically delete the mounts when an account is deleted.
-
Hello, Using a NFS mount for the public_html directory is unsupported, however if you prefer to do this then you could use hooks to automatically run a custom script after account creation: Guide to Standardized Hooks - Software Development Kit - cPanel Documentation The Accounts::Create and Accounts::Remove events are documented at: Guide to Standardized Hooks - Whostmgr Functions - Software Development Kit - cPanel Documentation Thank you. 0
Please sign in to leave a comment.
Comments
1 comment