Rebuild Web Config for all users.
Rebuild Web Config for all users.
Hi,
With the recent upgrades, the config of the webservers changed. Is there a way to rebuild all the users in one command so they have the new config. I suspect that this change prevented one of the users from being correctly deleted.
Something like ...
for USER in $(v-list-users plain | cut -f 1)
do
v-rebuild-web-domains $USER
done
With the recent upgrades, the config of the webservers changed. Is there a way to rebuild all the users in one command so they have the new config. I suspect that this change prevented one of the users from being correctly deleted.
Something like ...
for USER in $(v-list-users plain | cut -f 1)
do
v-rebuild-web-domains $USER
done
Re: Rebuild Web Config for all users.
Just tried this and it worked. Got some errors with nginx restart, but I think that was because I was doing it so fast. So I'd go for this instead.
I'd suggest that you run this on any servers which were recently upgraded, because if you delete a user, the webserver config will break currently.
Code: Select all
#!/bin/bash
# Rebuild all users with new webserver config
for USER in $(v-list-users plain | cut -f 1)
do
v-rebuild-web-domains $USER
sleep 1
done