|
islesv
|
 |
« on: October 24, 2008, 02:28:14 PM » |
|
I was going over the scripts at OpenSourceCMS.com when I was (rudely  ) 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
|
 |
« 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 -------------- dd, a dump, a data dump read a line from standard in $USER, the name I call my self make - a long long time to run .so a library that is shared .ko it's not the same as .so tee, a redirect with in and out and brings us back to dd d d d
|
|
|
|
islesv
|
 |
« 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
|
 |
« 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
|
 |
« 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 -------------- dd, a dump, a data dump read a line from standard in $USER, the name I call my self make - a long long time to run .so a library that is shared .ko it's not the same as .so tee, a redirect with in and out and brings us back to dd d d d
|
|
|
|
islesv
|
 |
« 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. 
|
|
|
|
|
Logged
|
|
|
|
|
robleyd
|
 |
« 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 -------------- dd, a dump, a data dump read a line from standard in $USER, the name I call my self make - a long long time to run .so a library that is shared .ko it's not the same as .so tee, a redirect with in and out and brings us back to dd d d d
|
|
|
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
   
Offline
Posts: 15645
experimental theologian
|
 |
« Reply #7 on: October 26, 2008, 06:44:14 AM » |
|
The MySQL-reloading could be done in a similar way.
|
|
|
|
|
Logged
|
|
|
|
|
Ğaz
|
 |
« 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
|
Personal site: http://matt-shaffer.comCurrently being eaten alive by school and attempting to make a half decent game. Adios. Contact info is in profile. Might want to email me any IM details first, or I won't add you.
|
|
|
inp o҉rtb
The Gangsta
Global Moderator
Official 110mb Guru
   
Offline
Posts: 15645
experimental theologian
|
 |
« 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
|
|
|
|
|
general vegitable
|
 |
« Reply #10 on: October 26, 2008, 04:19:29 PM » |
|
they would have to use php, their hosts don't have crons
|
|
|
|
|
Logged
|
|
|
|
|
Ğaz
|
 |
« 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! 
|
|
|
|
|
Logged
|
Personal site: http://matt-shaffer.comCurrently being eaten alive by school and attempting to make a half decent game. Adios. Contact info is in profile. Might want to email me any IM details first, or I won't add you.
|
|
|
|
Piotr GRD
|
 |
« 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
|
|
|
|
|