No matter what I put inside the stop_server file the CodeDeploy ends up with the error as above.
I even commented out all the lines to simplify debugging, so now it looks inside like this
#!/bin/bash
# pkill -f node
My appspec.yml:
version: 0.0
os: linux
files:
- source: /app.js
destination: /home/ec2-user/node-website
- source: /package.json
destination: /home/ec2-user/node-website
- source: /public/
destination: /home/ec2-user/node-website/public
- source: /node_modules
destination: /home/ec2-user/node-website/node_modules
permissions:
- object: /
pattern: "**"
owner: ec2-user
group: ec2-user
hooks:
AfterInstall:
- location: scripts/install_dependencies
timeout: 300
runas: ec2-user
#- location: scripts/codestar_remote_access
# timeout: 300
# runas: ec2-user
- location: scripts/start_server
timeout: 300
runas: ec2-user
ApplicationStop:
- location: scripts/stop_server
timeout: 300
runas: ec2-user
Any sugestions highly appreciated!