Script at specified location: scripts/install_ngnix.sh run as user root failed with exit code 100

37 Views Asked by At

I am about to deploy an application on EC2 but it shows this error which I couldn't understand how to resolve. Please look into this and tell me what am I doing wrong.

"Error occuring while deploying on aws AfterInstall event: Script at specified location: /scripts/install_ngnix.sh run as user root failed with exit code 100 "

Here's the appspec.yml file:

version: 0.0
os: linux
files:
  - source: /
    destination: var/www/html
    overwrite: true
file_exists_behavior: OVERWRITE

hooks:
AfterInstall: 
   - location: /scripts/install_ngnix.sh
     timeout: 300
     runas: root
ApplicationStart: 
   - location: /scripts/start_ngnix.sh
     timeout: 300
     runas: root

Here's the install_ngnix.sh:

#!/bin/bash
sudo apt-get update
sudo apt-get install -y ngnix

Here's the start_ngnix.sh:

#!/bin/bash
sudo service ngnix start
0

There are 0 best solutions below