Skip to content

Commit 49cbd99

Browse files
committed
docs(mkdocs): update pre/post page
1 parent 0eb7848 commit 49cbd99

File tree

3 files changed

+79
-24
lines changed

3 files changed

+79
-24
lines changed

docs/docs/install/install.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -815,19 +815,35 @@ You can now proceed to the [Next Steps](#next-steps) or skip the rest of this se
815815

816816
## Install: DirectAdmin
817817

818+
819+
<div class="grid cards" markdown>
820+
821+
- :aetherx-axb-directadmin: &nbsp; __[DirectAdmin: System Requirements](https://docs.directadmin.com/getting-started/installation/overview.html#system-requirements)__
822+
823+
---
824+
825+
System requirements for installing DirectAdmin.
826+
827+
- :aetherx-axb-directadmin: &nbsp; __[DirectAdmin: Installation Guide](https://docs.directadmin.com/getting-started/installation/installguide.html)__
828+
829+
---
830+
831+
Official DirectAdmin installation guide.
832+
833+
</div>
834+
818835
Before you begin installing DirectAdmin, you will need a valid license key. You can obtain one by [purchasing a plan](https://directadmin.com/pricing.php).
819836

820837
DirectAdmin offers competitively priced options, with the **Personal Plus** plan starting at just $5.00 USD per month.
821838

822-
??? note "Free Trial"
839+
??? note "Free Trial Availability"
823840

824841
Currently, there is no information available regarding a free trial license for DirectAdmin.
825842
If the DirectAdmin team wishes to clarify this, they can contact us via the [GitHub Repository](https://github.com/Aetherinox/csf-firewall/issues).
826843

827844
<br />
828845

829-
Once you have your license, download the DirectAdmin installation script to your server.
830-
The specific command to use depends on your Linux distribution.
846+
Once you have your license, download the DirectAdmin installation script to your server. The specific command to use depends on your Linux distribution.
831847

832848
=== ":aetherx-axd-circle-1: Option 1"
833849

@@ -1130,20 +1146,20 @@ Clicking the menu item **ConfigServer Security and Firewall** will open the CSF
11301146

11311147
<br />
11321148

1133-
The next important page to be aware of is the **Plugins** page:
1149+
The next important page to be aware of is the **Plugins Manager** page:
11341150

11351151
<figure markdown="span">
1136-
![DirectAdmin › Extra Features › Plugins](../assets/images/install/directadmin/06_usage.png){ width="370" }
1137-
<figcaption>DirectAdmin › Extra Features › Plugins</figcaption>
1152+
![DirectAdmin › Extra Features › Plugins Manager](../assets/images/install/directadmin/06_usage.png){ width="370" }
1153+
<figcaption>DirectAdmin › Extra Features › Plugins Manager</figcaption>
11381154
</figure>
11391155

11401156
<br />
11411157

11421158
On this page, you can see a list of all currently installed DirectAdmin plugins, including the installed version of CSF:
11431159

11441160
<figure markdown="span">
1145-
![DirectAdmin › Extra Features › Plugins](../assets/images/install/directadmin/04_usage.png){ width="800" }
1146-
<figcaption>DirectAdmin › Extra Features › Plugins</figcaption>
1161+
![DirectAdmin › Extra Features › Plugins Manager](../assets/images/install/directadmin/04_usage.png){ width="800" }
1162+
<figcaption>DirectAdmin › Extra Features › Plugins Manager</figcaption>
11471163
</figure>
11481164

11491165

docs/docs/stylesheets/extra.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4373,6 +4373,15 @@ figure img
43734373
background-color: unset !important;
43744374
}
43754375

4376+
/*
4377+
Nacigation Cards
4378+
*/
4379+
4380+
.grid.cards p:nth-of-type(2)
4381+
{
4382+
font-size: 0.9em;
4383+
}
4384+
43764385
/*
43774386
Homepage › Hero / Image Elements
43784387
*/

docs/docs/usage/prepost.md

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,57 @@ This section outlines exactly how the pre and post scripts are initialized and l
4141

4242
<br />
4343

44-
### Loader Scripts
44+
### Structure
4545

46-
- When CSF is installed for the first time, two files :aetherx-axd-file: `/usr/local/csf/bin/csfpre.sh` and :aetherx-axd-file: `/usr/local/csf/bin/csfpost.sh` are automatically created on your system _(they will not overwrite existing copies)_. These files are loader scripts, giving you the ability to add your own custom bash scripts.
47-
- You must create the pre-loader folder :aetherx-axd-folder: `/usr/local/include/csf/pre.d/` and post-loader folder :aetherx-axd-folder: `/usr/local/include/csf/post.d/`
48-
- If you already have existing pre/post loader files in place, CSF will respect this and **NOT** overwrite your existing files. Your existing setup will not be touched.
46+
When CSF is installed for the first time, it automatically creates two files:
47+
48+
- 📄 `/usr/local/csf/bin/csfpre.sh`
49+
- 📄 `/usr/local/csf/bin/csfpost.sh`
50+
51+
<br />
52+
53+
These files act as **loader scripts**. They allow you to run your own custom Bash scripts **before** and **after** CSF executes. To use them, create the following directories:
54+
55+
- 📁 `/usr/local/include/csf/pre.d/` — scripts run *before* CSF
56+
- 📁 `/usr/local/include/csf/post.d/` — scripts run *after* CSF
57+
58+
??? note "Existing Files"
59+
60+
If you already have pre-loader and post-loader files in placve on your server,
61+
CSF will **not** overwrite them. Your existing configuration will be left exactly
62+
as-is.
63+
64+
<br />
65+
66+
After creating the directories above, you can now place your own custom bash scripts inside these folders. Restart CSF to load them.
4967

5068
<br />
5169

70+
### Loader Files
71+
72+
As mentioned above, when installing CSF, two files will be loaded to your system. Those files are outlined below:
73+
5274
:aetherx-axd-file: <!-- md:option /usr/local/csf/bin/csfpre.sh -->
5375

54-
: - The file `csfpre.sh` installed with CSF loads every custom bash script you drop in the :aetherx-axd-folder: `/usr/local/include/csf/pre.d/` folder.
55-
- If making your own `csfpre.sh` loader, there are **two allowed locations** to place this script — either one is valid:
56-
- [x] `/usr/local/csf/bin/csfpre.sh` <small>:aetherx-axd-note-sticky: _(default)_</small>
57-
- [x] `/etc/csf/csfpre.sh` <small>:aetherx-axd-note-sticky: _(alternative)_</small>
58-
- Runs **before** all default iptables rules are applied; allows you to add custom rules which persist alongside CSF's defaults.
76+
: - The `csfpre.sh` loader executes **every custom Bash script** located in the
77+
:aetherx-axd-folder: `/usr/local/include/csf/pre.d/` directory.
78+
- If you create your own `csfpre.sh`, CSF will accept it from **either** of the following locations:
79+
- [x] `/usr/local/csf/bin/csfpre.sh` <small>:aetherx-axd-note-sticky: _(default location)_</small>
80+
- [x] `/etc/csf/csfpre.sh` <small>:aetherx-axd-note-sticky: _(alternative location)_</small>
81+
- Scripts run **before** any default iptables rules are applied, making this the ideal place to add
82+
custom firewall rules that should exist alongside CSF’s defaults.
83+
84+
<br />
5985

6086
:aetherx-axd-file: <!-- md:option /usr/local/csf/bin/csfpost.sh -->
6187

62-
: - The file `csfpost.sh` installed with CSF loads every custom bash script you drop in the :aetherx-axd-folder: `/usr/local/include/csf/post.d/` folder.
63-
- If making your own `csfpost.sh` loader, there are **two allowed locations** to place this script — either one is valid:
64-
- [x] `/usr/local/csf/bin/csfpost.sh` <small>:aetherx-axd-note-sticky: _(default)_</small>
65-
- [x] `/etc/csf/csfpost.sh` <small>:aetherx-axd-note-sticky: _(alternative)_</small>
66-
- Runs **after** all default iptables rules are applied, allowing you to add custom rules which persist alongside CSF's defaults.
88+
: - The `csfpost.sh` loader executes **every custom Bash script** located in the
89+
:aetherx-axd-folder: `/usr/local/include/csf/post.d/` directory.
90+
- If you create your own `csfpost.sh`, CSF will accept it from **either** of the following locations:
91+
- [x] `/usr/local/csf/bin/csfpost.sh` <small>:aetherx-axd-note-sticky: _(default location)_</small>
92+
- [x] `/etc/csf/csfpost.sh` <small>:aetherx-axd-note-sticky: _(alternative location)_</small>
93+
- Scripts run **after** all default iptables rules have been applied, allowing you to safely append
94+
custom rules that persist without interfering with CSF’s core configuration.
6795

6896
??? note "**pre.sh & post.sh:** Multiple Locations Allowed"
6997

@@ -288,7 +316,7 @@ After you edit the list of ports above, restart CSF and the script will be autom
288316

289317
=== ":aetherx-axs-square-terminal: Output"
290318

291-
```shell
319+
```shell hl_lines="6 7"
292320
LOGDROPOUT all opt -- in * out !lo 0.0.0.0/0 -> 0.0.0.0/0
293321
LOGDROPIN all opt -- in !lo out * 0.0.0.0/0 -> 0.0.0.0/0
294322
csf: FASTSTART loading DNS (IPv4)
@@ -306,7 +334,9 @@ After you edit the list of ports above, restart CSF and the script will be autom
306334

307335
<br />
308336

309-
We can now use the `iptables` command to confirm our rules were added. Iptables will resolve whatever service is associated with a port, which means port `111` will show as `sunrpc`. If you wish to show just the port number, append `-n` to your iptables command:
337+
We can now use the `iptables` command to confirm our rules were added. Iptables will resolve whatever service is associated with a port, which means port `111` will show as `sunrpc`.
338+
339+
If you wish to show just the port number, append `-n` to your iptables command:
310340

311341
=== ":aetherx-axd-command: Command"
312342

0 commit comments

Comments
 (0)