From 5107b08e1a753485fa5d992e9373c8c3d2dcd080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20P=C3=A0mies?= Date: Sat, 28 Jan 2023 23:08:20 +0100 Subject: [PATCH] create wp updater on cpanel --- wordpress_cpanel_updater.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 wordpress_cpanel_updater.sh diff --git a/wordpress_cpanel_updater.sh b/wordpress_cpanel_updater.sh new file mode 100644 index 0000000..ce43b19 --- /dev/null +++ b/wordpress_cpanel_updater.sh @@ -0,0 +1,23 @@ +#!/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 (?)