Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert nonwp #3

Open
nbwpuk opened this issue Jan 25, 2017 · 2 comments
Open

Invert nonwp #3

nbwpuk opened this issue Jan 25, 2017 · 2 comments

Comments

@nbwpuk
Copy link

nbwpuk commented Jan 25, 2017

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?

@MarioKnight
Copy link
Owner

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!

@nbwpuk
Copy link
Author

nbwpuk commented Feb 6, 2017

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants