• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question CLI: Domain-Lock?

omexlu

Regular Pleskian
Hello,

I want to make some bash-script who make a tarball backup from a specific folder.
Is it somehow possible to block a domain via CLI ("503" redirection)?

And how activate after them?

Thanks in advance.
 
# plesk bin domain --suspend domain.com
# plesk bin domain --on domain.com
 
# plesk bin domain --suspend domain.com
# plesk bin domain --on domain.com

Just some question if i have few rows in my bash script who have this command-lines there are no conflict if they are maybe executed "fast" on after one? (maybe with apache restart or some else)
 
Just some question if i have few rows in my bash script who have this command-lines there are no conflict if they are maybe executed "fast" on after one? (maybe with apache restart or some else)
Yes, it would be useful to set up delay there between these commands.
 
This may depend on many factors, so, try to find it experimentally.

Okay thank you maybe it is possible to disable multiple domains on one command to minimize this problem?
So there is one command at start at one command at end and apache only need to restart twice?
 
Okay thank you maybe it is possible to disable multiple domains on one command to minimize this problem?

for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/domain --suspend $i; done

"select name from domains" you can change with more specific SQL query for selected domains.
 
Thanks you, something like not possible?
# plesk bin domain --suspend domain.com domain2.com domain3.com domain4.com domain5.com
# plesk bin domain --on domain.com domain2.com domain3.com domain4.com domain5.com
 
It is impossible. And what if you have 125 domains? :)

Its only for 5 domains on my privat-projects (not for webhosting) :D

So there is only one query at start and on at end of the bashscript, but in this case the websites who tarbar and mysqldump is already finish as disabled until all are finish.
 
Back
Top