Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Hacked websites and VestaCP

General questions about VestaCP
Locked
  • Print view
Advanced search
13 posts
  • Previous
  • 1
  • 2
plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Hacked websites and VestaCP

Post by plutocrat » Fri Nov 10, 2017 2:59 am

Something like this would work. Just a quick and dirty prototype

Code: Select all

#!/bin/bash

for URL in \
	/home/admin/web/domain.com/public_html/ \
	/home/admin/web/sub.other.com/public_html/blog/ \
	/home/user/web/third.com/public_html/
do
	WPUSER=$( echo $URL  | awk -F "/" '{ print $3}' )

	WPCMD="sudo -u $WPUSER -i -- /usr/local/bin/wp-cli --path=$URL"

	echo " ------ $URL -------" >> output.txt
	$WPCMD core check-update  >> output.txt
	$WPCMD plugin list >> output.txt

done

mutt -s "Report for $(hostname -f)" [email protected] < output.txt

rm output.txt
Top

Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Re: Hacked websites and VestaCP

Post by Spheerys » Fri Nov 10, 2017 7:48 am

Nice script ! Thanks :)
Top

baoang
Posts: 40
Joined: Fri Feb 23, 2018 7:31 am

Os: CentOS 5x
Web: nginx + php-fpm
Re: Hacked websites and VestaCP

Post by baoang » Mon Apr 09, 2018 6:59 am

plutocrat wrote: ↑
Mon Nov 06, 2017 4:25 am
As a service to your customers, you might consider writing a script to get wp-cli to check for un-updated plugins and wp installations. It could send out an automated email if it found many updates.

It could even perform the upgrades if you wanted, but that might be a bit intrusive.

http://wp-cli.org/
It seems wp-cli and EE (https://easyengine.io/) have cooperation. EE only runs on Debian and Ubuntu, and with-out ui.
Top


Locked
  • Print view

13 posts
  • Previous
  • 1
  • 2

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password