KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:how-to-use-automation-via-directadmins-hooks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
control-panels:directadmin:how-to-use-automation-via-directadmins-hooks [2020/06/15 09:48]
Karson N.
control-panels:directadmin:how-to-use-automation-via-directadmins-hooks [2020/06/16 14:40] (current)
Karson N.
Line 1: Line 1:
 ====== Automation Via DirectAdmin's Pre and Post Hooks ====== ====== Automation Via DirectAdmin's Pre and Post Hooks ======
- 
 ---- ----
  
Line 65: Line 64:
 First, you must write your script that you want to run upon domain creation. Do note that this script uses WP-CLI, so it must be installed on your server at /usr/local/bin/wp in order to use the script. WP_CLI is installed by default on KnownHost servers.  First, you must write your script that you want to run upon domain creation. Do note that this script uses WP-CLI, so it must be installed on your server at /usr/local/bin/wp in order to use the script. WP_CLI is installed by default on KnownHost servers. 
  
----- 
 STEP 1 Write your script and save it named accordingly for the pre or post hook you want to utilize STEP 1 Write your script and save it named accordingly for the pre or post hook you want to utilize
  
Line 149: Line 147:
 The script will need to be placed in the custom scripts directory for DirectAdmin to find it. You will need to be logged in as the root user via SSH to access this directory. The script will need to be placed in the custom scripts directory for DirectAdmin to find it. You will need to be logged in as the root user via SSH to access this directory.
  
----- 
 STEPS 3 & 4 STEPS 3 & 4
 Make the script executable and accessible to DirectAdmin: Make the script executable and accessible to DirectAdmin:
Line 157: Line 154:
 </code> </code>
  
----- 
 Now that all is done, log into DirectAdmin and create a domain to test. You should see output similar to the following once the domain is created and the script is ran: Now that all is done, log into DirectAdmin and create a domain to test. You should see output similar to the following once the domain is created and the script is ran:
  
control-panels/directadmin/how-to-use-automation-via-directadmins-hooks.txt · Last modified: 2020/06/16 14:40 by Karson N.