Shell script to start a asp.net website/service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blacky
    New Member
    • Jan 2009
    • 40

    Shell script to start a asp.net website/service

    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
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #2
    Where have you deployed your asp.net website?
    I mean operating system? web server etc?

    Comment

    • Blacky
      New Member
      • Jan 2009
      • 40

      #3
      These are the details,

      OS: Windows 2003 server
      Webserver : IIS 7.0

      Comment

      • ashitpro
        Recognized Expert Contributor
        • Aug 2007
        • 542

        #4
        if it is windows machine, how are you planning to run shell scripts?

        using cygwin?

        Or are you talking about batch scripts?

        Comment

        • Blacky
          New Member
          • Jan 2009
          • 40

          #5
          using uc4 tool. i can call that script in uc4

          Comment

          • ashitpro
            Recognized Expert Contributor
            • Aug 2007
            • 542

            #6
            In typical linux system, you will need to write a script with start/stop switches, then invoke the relative service binaries from respective functions.



            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.



            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.

            Comment

            • Blacky
              New Member
              • Jan 2009
              • 40

              #7
              Thanx but where do we specify the server details in the shell scripts

              Comment

              • ashitpro
                Recognized Expert Contributor
                • Aug 2007
                • 542

                #8
                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:

                The Types of Commands used to Manage IIS from the Command Line The types of commands that manage IIS from the command line are: IISReset, Windows Management Instrumentation (WMI) scripts, Active Directory Services Interface (ADSI), and the standard Windows commands and Support Tools utilities. IISReset Command-line Utility IISReset is a command-line utility that has been


                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.

                Comment

                Working...