Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOpsSchool!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

AWS CodeDeploy: Deploy apps using appspec.yml with IIS stop/start


Note – in this program file “before-iis-install-stop.bat” & “after-iis-install-start.bat” & index.html is in same directory.


Step 1 – Write before-iis-install-stop.bat


@echo off
REM - File: before-iis-install-stop.bat

echo Restarting IIS...
echo ======================================================

net stop W3SVC

echo ======================================================
echo IIS StoppedCode language: PHP (php)

Step 2 -Write after-iis-install-start.bat


@echo off
REM - File: after-iis-install-start.bat 

echo Restarting IIS...
echo ======================================================

net start W3SVC

echo ======================================================
echo IIS RestartedCode language: PHP (php)

Step 3 – Write appspec.yml


version: 0.0
os: windows
files:
  - source: \index.html
    destination: c:\inetpub\wwwroot
hooks:
  BeforeInstall:
    - location: \before-iis-install-stop.bat
      timeout: 900
  AfterInstall:
    - location: \after-iis-install-start.bat
      timeout: 180Code language: CSS (css)

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x