/
etc
/
profile.d
/
/etc/profile.d
mkdir
upload
Name
Size
Mode
Actions
bash_completion.sh
664
0644
edit
dl
rm
bash_timestamps.sh
69
0644
edit
dl
rm
colorgrep.csh
196
0644
edit
dl
rm
colorgrep.sh
201
0644
edit
dl
rm
colorls.csh
1741
0644
edit
dl
rm
colorls.sh
1606
0644
edit
dl
rm
colorsysstat.csh
69
0644
edit
dl
rm
colorsysstat.sh
56
0644
edit
dl
rm
colorxzgrep.csh
162
0644
edit
dl
rm
colorxzgrep.sh
183
0644
edit
dl
rm
colorzgrep.csh
216
0644
edit
dl
rm
colorzgrep.sh
220
0644
edit
dl
rm
cpanel-user-commands.sh
358
0644
edit
dl
rm
csh.local
80
0644
edit
dl
rm
debuginfod.csh
674
0644
edit
dl
rm
debuginfod.sh
596
0644
edit
dl
rm
dedrads.sh
85
0644
edit
dl
rm
gawk.csh
1107
0644
edit
dl
rm
gawk.sh
757
0644
edit
dl
rm
imh-sys-snap.sh
94
0644
edit
dl
rm
lang.csh
2489
0644
edit
dl
rm
lang.sh
2312
0644
edit
dl
rm
less.csh
500
0644
edit
dl
rm
less.sh
253
0644
edit
dl
rm
locallib.csh
240
0755
edit
dl
rm
locallib.sh
272
0755
edit
dl
rm
modules.csh
105
0644
edit
dl
rm
modules.sh
448
0644
edit
dl
rm
rads-autocomplete.sh
8559
0644
edit
dl
rm
scl-init.csh
284
0644
edit
dl
rm
scl-init.sh
637
0644
edit
dl
rm
sh.local
81
0644
edit
dl
rm
vim.csh
106
0644
edit
dl
rm
vim.sh
248
0644
edit
dl
rm
which2.csh
120
0644
edit
dl
rm
which2.sh
628
0644
edit
dl
rm
wp-cli-include.sh
58
0644
edit
dl
rm
wp3.sh
3012
0644
edit
dl
rm
Edit:
/etc/profile.d/wp3.sh
(3012B)
#!/bin/bash # only run this code on platform i ultrastack vps if [[ ! -f /etc/ansible/wordpress-ultrastack ]]; then return fi # aliases alias apachestatus='links -dump http://localhost:8080/server-status' # paths PATH=/opt/tier1adv/bin:$PATH # functions get_site_domain() { variables=/root/.ansible/logs/wp3_run/latest/variables /usr/bin/jq -r .site_domain $variables 2>/dev/null || echo "\$site_domain" } usmotd() { echo -en "\ Platform i UltraStack VPS Quick Reference: ========================================== * account-review\tView account details * certbot\t\tManage LE certs (T1E+) * fixperms\t\tCorrect permissions * fpmstatus\t\tReview php-fpm status * modsec_disable\tDisable ModSec Rule * switch\t\tChange user shell * ushelp\t\tDisplay help docs * usmotd\t\tDisplay this MOTD * usutil\t\tNginx cache tool " } ushelp() { site_domain=$(get_site_domain) echo -en "\ Command Reference: ================== T1E+ commands must be ran as root user. View Apache Service Status $ apachestatus (T1E+) View installed/configured letsencrypt certificates # certbot certificates Example of running fixperms $ fixperms wordpress Check status of fpm pools $ fpmstatus $ fpmstatus -V (verbose output) Disable a ModSecurity rule $ modsec_disable --rule 913100 (T1E+) Analyze fpm pool memory usage # smem -ntk --processfilter='[p]hp-fpm: pool' Example of switching to wordpress user $ switch wordpress Example of clear all NGiNX Cache $ usutil --purgeall Example of viewing NGiNX Cache Stats $ usutil Service Control: =============== (T1E+) Restart Various Services # systemctl restart nginx|apache|mysql|php-fpm|redis|monit (T1E+) View status of all services # monit status Log Locations: ============== * NGiNX: - access: /var/log/nginx/access.log - error: /var/log/nginx/error.log * Apache: - main: /var/log/httpd/error_log - access: /var/log/httpd/ssl-${site_domain}-access.log - error: /var/log/httpd/ssl-${site_domain}-error.log Note: if SSL not enabled, remove \"ssl-\" from logpath * MySQL/MariaDB: - error: /var/lib/mysql/$(hostname).err - slow: /var/lib/mysql/$(hostname -s)-slow.log (disabled by default) * PHP-FPM: - master: /var/log/php-fpm/error.log - pool: /home/wordpress/logs/${site_domain//\./_}.php.error.log * Redis: - main: /var/log/redis/redis.log * Monit: - main: /var/log/monit.log Config Locations: ================= * NGiNX: - site: /etc/nginx/conf.d/${site_domain}.conf - main: /etc/nginx/nginx.conf * Apache: - site: /etc/httpd/conf.d/${site_domain}.conf - main: /etc/http/conf/httpd.conf - modsec: /etc/httpd/conf.d/mod_security.conf * MySQL/MariaDB: - main: /etc/my.cnf.d/server.cnf - innodb: /etc/my.cnf.d/innodb.cnf - query cache: /etc/my.cnf.d/qcache.cnf * PHP-FPM: - php.ini: /etc/php.ini - pool: /etc/php-fpm.d/${site_domain}.conf * Redis: - main: /etc/redis/redis.conf * Monit: - main: /etc/monitrc - service: /etc/monit.d/* " | more } if whoami | grep -qE "^(tier1adv|root)$"; then usmotd fi
Save
cmd:
run