Empty

Total: $0.00

Error message

  • Deprecated function: Array and string offset access syntax with curly braces is deprecated in include_once() (line 20 of /var/www/rugga/it-dan.com/includes/file.phar.inc).
  • Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1387 of /var/www/rugga/it-dan.com/includes/bootstrap.inc).
  • Deprecated function: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in include_once() (line 1387 of /var/www/rugga/it-dan.com/includes/bootstrap.inc).
  • Deprecated function: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in include_once() (line 1387 of /var/www/rugga/it-dan.com/includes/bootstrap.inc).
  • Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in include_once() (line 1387 of /var/www/rugga/it-dan.com/includes/bootstrap.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 395 of /var/www/rugga/it-dan.com/includes/common.inc).

Linux

By IT Dan, 06/19/2018 - 19:49
wordpress logo

I wanted a script to automate the copying of a live website to a "staging" site on the same machine. This was tested on Debian Jessie.

Before you begin:
In this case make sure the same database user has the appropriate permissions on both databases. And also note that the RELOAD privilege is needed to use the `mysqldump --lock-all-tables` option on the existing live database.

Script below:

Category: 
By IT Dan, 06/13/2018 - 17:08
Linux Tux and vsftpd

Below is a script that checks the current external IP address, and if it has changed since last check, updates the pasv_address line in the vsftpd.conf file.

I'm using Debian Stretch. For dig you may need to install dnsutils like so:

apt-get install dnsutils

Create the shell script file:

Category: 
Subscribe to RSS - Linux