bashscripts/wordpress_cpanel_updater.sh

24 lines
695 B
Bash

#!/usr/bin/env bash
#require:
#wp-cli https://wp-cli.org/#installing
#wp-updater https://github.com/keesiemeijer/wp-update
#get accounts and domains
/usr/local/cpanel/scripts/updateuserdomains
cat /etc/trueuserdomains
#https://docs.cpanel.net/whm/scripts/whm-scripts/
#https://docs.cpanel.net/whm/account-functions/manage-shell-access/
#https://support.cpanel.net/hc/en-us/articles/360051992634-Differences-Between-Normal-and-Jailed-Shell
#https://www.cyberciti.biz/tips/how-do-i-find-out-what-shell-im-using.html
#get bash from user
grep "^$USER" /etc/passwd
awk -F: '/$USER/ { print $7}' /etc/passwd
#change shell
usermod -s /bin/false $USER
#https://github.com/layfellow/cpanel-cli (?)