www-admtools/www-delete-site
2021-08-26 00:34:48 +02:00

18 lines
578 B
Perl
Executable File

#!/usr/bin/perl
use strict; use warnings; use utf8;
my $site = $ARGV[0] || 'SITE';
$site =~ s/\/$//;
print "No site given. using SITE as placeholder\n" if $site eq 'SITE';
print <<EOT
--> Do this:
rm /etc/apache2/sites-enabled/$site.conf
apachectl graceful
www-phpfpm -s $site -d
deluser www-$site
echo 'DROP DATABASE $site;' | mysql -u root -p`cat /etc/mysql/jelszo`
echo 'DROP USER $site\@localhost;' | mysql -u root -p`cat /etc/mysql/jelszo`
rm -r /www/$site
- letsencrypt domains.txt-bol kivenni, revoke certificate
EOT
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab: