110mb.com Forum
News: Can't upload images in SiteBuilder on Box17? Solution here. | CGI/Perl/Python disabled on all servers. Updating it's security... | Ads trial to begin end of July/early Aug. More...
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 05, 2009, 08:16:59 AM


Login with username, password and session length


Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Automatic installation and reinstallation of the scripts?  (Read 651 times)
islesv
Not Very Authoritative
Advanced Authority Member
*****
Offline Offline

Posts: 1016



WWW
« on: October 24, 2008, 02:28:14 PM »

I was going over the scripts at OpenSourceCMS.com when I was (rudely smiley) interrupted by their stand by message.

Then it made me ask myself how they do the automatic installation and reinstallation of the scripts - I don't even know how to name that procedure.

Surely they don't do it manually - an automated script should be doing it for them.

Any idea everyone?
Logged

robleyd
Official 110mb Guru
********
Offline Offline

Posts: 5333

Ask before you PM


« Reply #1 on: October 24, 2008, 03:31:16 PM »

Probably a script run from cron.
Logged

I once had a hard drive clunk-clicking
Strange noises, weird sounds and tick-ticking
I thought I would wait
And procrastinate...
But now all my data is missing
islesv
Not Very Authoritative
Advanced Authority Member
*****
Offline Offline

Posts: 1016



WWW
« Reply #2 on: October 24, 2008, 09:36:25 PM »

But they have to make automated installers for each of the scripts, right?
Logged

mykajay
Hyper-Active Member
***
Offline Offline

Posts: 156


« Reply #3 on: October 24, 2008, 09:43:48 PM »

if you think deep that is just a simple script, like virus it just copying itself
Logged
robleyd
Official 110mb Guru
********
Offline Offline

Posts: 5333

Ask before you PM


« Reply #4 on: October 24, 2008, 10:08:05 PM »

But they have to make automated installers for each of the scripts, right?

And that might be as difficult as something like

cp /src/of/pkg.tgz /target
tar xvf /target/pkg.tgz
cp /safe/configfiles/package /target

With a bit of "for x in" it probably wouldn't be a major task. Apologies if you are a Windows person as this is sort of pseudo shell scripting.
Logged

I once had a hard drive clunk-clicking
Strange noises, weird sounds and tick-ticking
I thought I would wait
And procrastinate...
But now all my data is missing
islesv
Not Very Authoritative
Advanced Authority Member
*****
Offline Offline

Posts: 1016



WWW
« Reply #5 on: October 24, 2008, 11:42:35 PM »

I'm actually comfortable with such commands (I used Slackware since way back 2003, and only changed to Ubuntu in 2005 because I had to share my PC with my brother who is a Windows user). What I can't figure out is how to make an automated installation script because I'm new to PHP. Smiley
Logged

robleyd
Official 110mb Guru
********
Offline Offline

Posts: 5333

Ask before you PM


« Reply #6 on: October 25, 2008, 10:41:22 AM »

It wouldn't necessarily have to be php - a shell script, or a perl script or whatever, driven by cron would do the job.

php does have some functions that emulate file system functions, and there are the system commands like exec, system etc that call system executables - and of course there is a command line version of php.
Logged

I once had a hard drive clunk-clicking
Strange noises, weird sounds and tick-ticking
I thought I would wait
And procrastinate...
But now all my data is missing
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
*****
Offline Offline

Posts: 14156


experimental theologian


WWW
« Reply #7 on: October 26, 2008, 06:44:14 AM »

The MySQL-reloading could be done in a similar way.
Logged

Hi! I’m a signature virus! Add me to your signature to help me spread.
spam me: ispamspot@gmail.com

blog | my work @ deviantART | Imagine-ng image editor
Ðaz
Loyal 110MB Member
*******
Online Online

Posts: 2881



WWW
« Reply #8 on: October 26, 2008, 01:11:34 PM »

Here's what they probably do, but I'm too lazy to actually prototype it.
1. Cron (Never messed with it, so can't say I know how it works)
2. PHP heavily relying on constant visitors. Then, when it's the general time for reinstallation, proceed.
 - How it could work:
  1. PHP wipes out the entire mysql database
  2. There are automated installation scripts (Not extremely hard, I would think) that are then executed.
  No files should have to be overwritten since the users can't access admin rights to upload templates or w/e. So the old files can stay.

Although, it sounds like a nice interesting project to do. Note: That it would be hard doing it with my theory because they would need to edit each registration script by hand to make it automate itself - and if you have little PHP knowledge it's quite a hard task to accomplish.
Logged

* http://tutorial-station.com (beta) (>100 tutorials indexed)
  - Help it grow! Register and submit links.
* http://matt-shaffer.com undergoing some development.

My spore
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
*****
Offline Offline

Posts: 14156


experimental theologian


WWW
« Reply #9 on: October 26, 2008, 03:09:32 PM »

I don't think it would be necessary to run the installation procedure when it might be easier to just maintain an image of the setup.
Logged

Hi! I’m a signature virus! Add me to your signature to help me spread.
spam me: ispamspot@gmail.com

blog | my work @ deviantART | Imagine-ng image editor
general vegitable
please ask (by pm duh!) before you yim me
Official 110mb Guru
********
Online Online

Posts: 5628


OMG my guy commited soupicide!!!


WWW
« Reply #10 on: October 26, 2008, 04:19:29 PM »

they would have to use php, their hosts don't have crons
Logged




Ðaz
Loyal 110MB Member
*******
Online Online

Posts: 2881



WWW
« Reply #11 on: October 26, 2008, 09:07:06 PM »

I don't think it would be necessary to run the installation procedure when it might be easier to just maintain an image of the setup.
OOohh you mean like keeping a simple sql database of the forum when it's first created and then restoring that database? Brilliant!  grin
Logged

* http://tutorial-station.com (beta) (>100 tutorials indexed)
  - Help it grow! Register and submit links.
* http://matt-shaffer.com undergoing some development.

My spore
Piotr GRD
Honoured 110MB Member
Official 110mb Guru
*****
Offline Offline

Posts: 5455



WWW
« Reply #12 on: October 26, 2008, 09:12:56 PM »

Of course - it's the most easy way.
Just "save" the config files and database just after fresh install and then overwrite it everytime when needed. (when needed is setup with cron). Also temporarily redirect to a "maintenence page" while process is running to avoid some unexpected behaviours when someone will test the thing in the middle of the process.
« Last Edit: October 26, 2008, 09:15:20 PM by Piotr GRD » Logged

Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

  Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC

Theme by Dilber MC | Using SEO4SMF Mod

All content on this forum (especially posts) is copyright property of 110mb & the member
who wrote the post. So if you wish to steal anyone's post on this forum, you'll wish you
were dead because our lawyers will sue your ass!