cPanel-wp-management
cPanel-wp-management copied to clipboard
Invert nonwp
I see the way that the nonwp file works but is there a way to invert the logic so that a file, say "managewp", could hold a list of accounts to cycle through?
Definitely! If you were to make a managewp
file that contains the usernames you only want to manage, you would want to have each username on its own line within it. Then you'll want to edit https://github.com/MarioKnight/cPanel-wp-management/blob/master/acct-common.sh#L3 to
accounts= `cat "$(dirname "$0")"/managewp`
Line 2 could be removed for optimization. This should be the only change that would need to be made if you wanted to invert the behavior. Please give it a shot and let me know how it works for you!
@MarioKnight I have forked this repo here: https://github.com/EncodeDesign/cPanel-wp-management then copied all files into a "managed" folder. I made the edit as above to acct-common.sh but encounter an error when run (webdesign is a test account I have setup on the server and is listed in the managewp file):
[~/cPanel-wp-management/managed]# ./wp-version.sh
./acct-common.sh: line 2: webdesign: command not found