473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Shell script to start a asp.net website/service

40
Hi,

I am new to shell scripts.Want to know the shell script for starting and stopping a asp.net website and service in a server.Ex: my website name is "website1" and service name is "Service1". I want to write a shell script for starting and stopping website1 and Service1 in a server say "aaa".

Thanx in advance,
Blacky
Oct 4 '10 #1
7 3013
ashitpro
542 Expert 512MB
Where have you deployed your asp.net website?
I mean operating system? web server etc?
Oct 4 '10 #2
Blacky
40
These are the details,

OS: Windows 2003 server
Webserver : IIS 7.0
Oct 4 '10 #3
ashitpro
542 Expert 512MB
if it is windows machine, how are you planning to run shell scripts?

using cygwin?

Or are you talking about batch scripts?
Oct 4 '10 #4
Blacky
40
using uc4 tool. i can call that script in uc4
Oct 4 '10 #5
ashitpro
542 Expert 512MB
In typical linux system, you will need to write a script with start/stop switches, then invoke the relative service binaries from respective functions.

http://www.cyberciti.biz/tips/linux-...p-service.html

Now, as you are using uc4, basic script structure should be same, the tricky part is to locating and invoking the service binaries. I am quite sure that you will have to refer its documentation.

On windows system you can use 'net' family command to manage your services.

http://technet.microsoft.com/en-us/l...8WS.10%29.aspx

I am not sure if you can execute such commands in so called shell scripts. There must be some way, specific to uc4. Unfortunately, there is nothing much available on google to help you.
Oct 4 '10 #6
Blacky
40
Thanx but where do we specify the server details in the shell scripts
Oct 4 '10 #7
ashitpro
542 Expert 512MB
In first link that I'd sent you, look for start() function.
They have shown how to invoke foo service. This is linux specific.

Check this link:

http://www.tech-faq.com/using-iis-co...anage-iis.html

It has shown how to start/stop iis and websites from command line.

All you have to do is write these command in start() functions.
Oct 4 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Robin Becker | last post by:
I wonder if this is the right way to write a medusa(asyncore) server with the win32all framework. Other example services seem to create an event to pass the stop signal from SvcStop into a separate...
8
by: Russ Green | last post by:
I'm using a Setup Project in VB.NET 2003 Standard to install a windows service application. I would like this installer to start the service after install. How do I do that? Thanks, Russ
3
shahjapan
by: shahjapan | last post by:
Hello, I want to start a server at the linux system boot up (UBUNTU 7.04 ) I have used start-stop-daemon command in my shell script for that. I have written my shell script path in...
9
by: niteck07 | last post by:
I am using following shell script to ftp files to another server but this is failing as the shell script changes the user name for the ftp login the correct user name is 'ag\invprint' which the...
0
by: sagarbsa | last post by:
Hii, I have a shell script to create a small dialog box to select options and give the output. But it is exiting the script without displaying anything. Can anyone help me with this cat > smenu #...
3
by: telduivel | last post by:
Can someone please help me with this: I have a python script, that at some point calls a linux bash script (.sh). Starting the shell script is the last thing my python script needs to do, so I...
1
by: iamforsecurity | last post by:
Hi, I am a newbie in Shell Script. I am trying to open 10 new sessions,each session running on a separate thread. For each session, I open a new xterm, go to a particular directory and run a...
5
by: inetquestion | last post by:
I am looking for a web interface for shell commands or shell scripts. Does anyone know of any exexisting php scripts which would solve this requirement? PHP form accepts input from a user, then...
16
by: pereges | last post by:
Do you see anything wrong about this method ? For eg. I write a shell script a.sh containing : cc -o test file1.c file2.c file3.c and then execute the shell script ( sh a.sh) to compile and...
7
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.