Generate a File Listing for Review
Fields
- Last Modified
- Size (bytes)
- Relative Path
Command
Replace {{search-path}}
with the path to search.
#cloud-config | |
--- | |
timezone: "UTC" | |
write_files: | |
- path: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7" | |
permissions: "0644" | |
owner: "root:root" | |
content: | | |
-----BEGIN PGP PUBLIC KEY BLOCK----- |
<?php | |
$responseCode = 500; | |
$responseCodeOk = 200; | |
$responseCodeFail = 503; | |
$url = 'https://www.deathe.org/'; | |
$ch = curl_init(); | |
curl_setopt_array( |
Replace {{search-path}}
with the path to search.
pmap -x $(ps ax \
| grep php-cgi \
| grep -v grep \
| awk '{ print $1 }' \
| awk -v RS='' '{ gsub("\n", " "); print; }'\
) | grep -E '^(Address|total)'
From the mysql client run:
mysql> SET GLOBAL general_log=true;
mysql> SET GLOBAL general_log_file='general.log';
After this queries will be logged to the named file located in the MySQL data directory. e.g. /var/lib/mysql/general.log
.
For all installed packages prefixed with php56u
, check for availability php71u
package.
# yum list installed \
| grep -o '^php56u[^ ]*' \
| { \
mapfile -t packages; \
for package in "${packages[@]}"; do \
The output of apachectl -S
is really useful but it's not easy to parse in a script. To make it easier to find the configuration file for a given NameVirtualHost host the following BASH one liner returns lines of output that can be easily parsed.
# apachectl -S 2>&1 \
| sed -rn -e '/NameVirtualHost$/,$ { /NameVirtualHost$/d; $ d; p; }' \
| sed -rn -e 's/^.*(port ([0-9]+) namevhost|alias) ([^ ]*)( )?(\((.*):[0-9]+\)|$)/\2 \6\n\3/p' \
| sed -r -e '/^$/d' -e 's/(.*\.conf$)/\n\1/g' \
| awk -vRS='' '$1=$1' \
| sort -n \
| uniq
To request a Let's Encrypt wildcard certificate there are the following prerequisites:
--server
option or configuration directive must be changed to the appropriate v2 endpoint.certbot-auto
# To install: | |
# sudo cat grow-root.service > /etc/systemd/system/grow-root.service | |
# sudo systemctl daemon-reload | |
# sudo systemctl enable -f grow-root.service | |
# | |
# Start (auto disables after first successful expansion): | |
# sudo systemctl start grow-root.service | |
# | |
# Debugging: | |
# sudo systemctl status grow-root.service |
The recommended location for custom scripts written for the Jadu CMS platform is within /public_html/site/custom_scripts/ but this can lead to long and unfriendly URLs. Here we show how to use the Readable URLs feature to create a cleaner URL structure for a simple custom script.
<install-path>/public_html/site/custom_scripts/php_version
and populate it with the following files: