-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///labs/ccnsb05/svn/Repo_CD_4@7 bb261590-0acd-428a-a52f-4eba15b8d69f
- Loading branch information
swathy
committed
Sep 26, 2013
1 parent
1ba9301
commit c654280
Showing
7 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/python | ||
print "Dummy Script" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/python | ||
## Build script | ||
## inst_i denotes ith instruction | ||
## if inst_i==0 than instruction is successful else not | ||
|
||
import os | ||
# Change Directory to source - src | ||
inst_1=os.chdir("../src") | ||
# Make src | ||
inst_2=os.system("make all") | ||
inst_3=os.system("cd ..") | ||
# Copy files to web folder | ||
inst_4=os.system("cp -r ../build/ /var/www/") | ||
inst_5=os.system("chmod 777 /var/www/build/ -R") | ||
|
||
if((inst_1 or inst_2 or inst_3 or inst_4 or inst_5)==0): | ||
print "****************" | ||
print "Build Successful" | ||
print "****************" | ||
else: | ||
print "******************" | ||
print "Build Unsuccessful" | ||
print "******************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
php5 | ||
apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/python | ||
## Initialize script | ||
## inst_i denotes ith instruction | ||
## if inst_i==0 than instruction is successful else not | ||
|
||
import os | ||
inst_1=os.system("export http_proxy=http://proxy.iiit.ac.in:8080/") | ||
inst_2=os.system("apt-get update") | ||
filen="dependencies.txt" | ||
f=open(filen,"r") | ||
dep=f.readlines() | ||
f.close() | ||
for pack in dep: | ||
p=pack.strip() | ||
inst_3=os.system("apt-get install -y "+p) | ||
|
||
inst_4=os.system("./build") | ||
if((inst_1 or inst_2 or inst_3 or inst_4)==0): | ||
print "************************" | ||
print "Intialization Successful" | ||
print "************************" | ||
else: | ||
print "**************************" | ||
print "Intialization Unsuccessful" | ||
print "**************************" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/python | ||
print "Dummy Script" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/python | ||
## Build script | ||
## inst_i denotes ith instruction | ||
## if inst_i==0 than instruction is successful else not | ||
|
||
# Apache Server Stop | ||
import os | ||
inst_1=os.system("service apache2 stop") | ||
|
||
if(inst_1==0): | ||
print "********************" | ||
print "Shutdown Successful" | ||
print "********************" | ||
else: | ||
print "*********************" | ||
print "Shutdown Unsuccessful" | ||
print "*********************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/python | ||
## Build script | ||
## inst_i denotes ith instruction | ||
## if inst_i==0 than instruction is successful else not | ||
|
||
# Apache Server Start | ||
import os | ||
inst_1=os.system("service apache2 start") | ||
|
||
if(inst_1==0): | ||
print "****************" | ||
print "Start Successful" | ||
print "****************" | ||
else: | ||
print "******************" | ||
print "Start Unsuccessful" | ||
print "******************" |