Last active
June 18, 2021 07:53
-
-
Save jaapmarcus/aea226b3a9bddfaea76b2e4fea3db7c6 to your computer and use it in GitHub Desktop.
Rename user package on bulk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
old_name="default" | |
new_name="new_package" | |
# Update package for existing users | |
for user in `ls /usr/local/hestia/data/users/`; do | |
OLD_PACKAGE=$(/usr/local/hestia/bin/v-get-user-value $user PACKAGE) | |
if [ "$old_name" = "$OLD_PACKAGE" ]; then | |
/usr/local/hestia/bin/v-change-user-package $user $new_name | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment