Færdiggjort

Linux Shell Script

This job is to create a linux shell script for the purposes of "mass cloning" wordpress installations on a single server. Script will have root user access to system. This is scrictly a linux shell script, to be run fron SSH consile. Should be a lot easier than writing a web interactive GCI or PHP program

## Deliverables

This job is to create a linux shell script for the purposes of "cloning" wordpress installations on a single server. Script will have root user access to system. Background: The server has approx 500 addon domains. All domains are located as folders within the /home/rfid/public_html folder. 1. cycle through all folders in public_html that end in a domain extensions (.com, .net, .org, .info, .us, .biz). An example target folder would be called /home/rfid/public_html folder/[url removed, login to view] 2. Determine which folders are missing the file "[url removed, login to view]". This would indicate that Wordpress is NOT installed in the folder. All the folders that are missing the [url removed, login to view] should be stored in an array (or something similar). There might possibly be close to 400 directories 3. The script must be able to accept an input argument, lets call it $TARGETSITE. The target site will be ONE of the 500 subfolders that contains the wordpress install that will be the basis for all the other sites to be cloned from. 4. The script must be able to GREP the [url removed, login to view] to obtain the name of the MySql database the $TARGETSITE is based on. 5. Perform a cp (copy) of all files, directories, and permissions in $TARGETSITE copy to $DESTSITE(#1 of 400) 6. (Note: the following is my idea, open to alternatives) Run MySqlDump on the database of $TARGETSITE 7. Create a new empty MySqlDatabase named $DESTSITE 8. Run a Database restore on the newly created $DESTSITE database from the dumpfile of $TARGETSITE 9. Run three SQL update queries on table WP-OPTIONS of the new $DESTSITE's database UPDATE WP-OPTIONS SET OPTION_VALUE="http://$DESTSITE" where option_name='siteurl' << Note: for example, should be full url such as "[url removed, login to view]" UPDATE WP-OPTIONS SET OPTION_VALUE="http://$DESTSITE" where option_name='home' << Note: for example, should be full url such as "[url removed, login to view]" UPDATE WP-OPTIONS SET OPTION_VALUE="$DESTSITE" where option_name='blogname' << Note: for example, should be just "[url removed, login to view]" (no http://) 10 . Perform a find and replace (FGREP?) on file [url removed, login to view] in the $DESTSITE directory define('DB_NAME', 'rfid_$TARGETSITE'); <<< need to replace the database name that belonged to $TARGETSITE with that of the new $DESTSITE 11. Continue looping thru the remaining directories and repeat steps 1 thru 10 until complete. NOTES: * Script should be in this format and arguments: [url removed, login to view] -mode -$targetsite $destsite the mode will be either "live" or "test". If test mode is run, script will simply echo the names of the sites that would be potentially created. Live mode would be the regular operation as described above * Script must be able the read a text file called [url removed, login to view], this file would contain the names of any sites the must be skipped. The exclusions file would contain one site per line. It will not contain the full path or url, just the site address. The contents of [url removed, login to view] might look like this: [url removed, login to view] [url removed, login to view] [url removed, login to view] * When running in live mode the script should verbose echo all the opereations that are being done, so I can get a visual feedback of what is happening. * In addition to echo output, it should write to [url removed, login to view], this file can get truncated at the beginning of each script execution. * A summary should be displayed at the end of script run, such as: ## SCRIPT FINISHED ### Total Target Sites: 430 Total Sites Copied: 430 Total Databases Created: 430

Evner: Ingeniørarbejde, Linux, MySQL, PHP, Projekt Ledelse, Software Arkitektur, Software Testning

Se mere: writing folders, writing com interactive, writing a script, what job can i get with a linux, web based ssh, us address format writing, steps to writing a summary, ssh copy directory, script writing program, run shell script from php, root info, restore wordpress site, mysqldatabase, linux 4.5, interactive writing com, home based writing job, gci net, find set-root, execution table, create shell script

Om arbejdsgiveren:
( 3 bedømmelser ) United States

Projekt ID: #3332915

Tildelt til:

mirceah

See private message.

$102 USD in 3 dage
(24 bedømmelser)
3.9

6 freelancere byder i gennemsnit $104 på dette job

waster

See private message.

$127.5 USD in 3 dage
(156 bedømmelser)
6.0
devl

See private message.

$85 USD in 3 dage
(48 bedømmelser)
5.6
YoctoPetaBorg

See private message.

$94.35 USD in 3 dage
(26 bedømmelser)
4.8
wrarvw

See private message.

$85 USD in 3 dage
(23 bedømmelser)
4.1
oshaz

See private message.

$127.5 USD in 3 dage
(1 bedømmelse)
0.0