Commit 9cdca8bf authored by Daniel Baur's avatar Daniel Baur

Looks like the python scripts dont like this, so we use the shell....

parent 370be08e
...@@ -39,7 +39,7 @@ def configure(subject=None): ...@@ -39,7 +39,7 @@ def configure(subject=None):
_run('sudo curl -L -o /opt/',error_message='Failed downloading ghost') _run('sudo curl -L -o /opt/',error_message='Failed downloading ghost')
_run('sudo unzip -uo /opt/ -d /opt/ghost',error_message='Failed unzipping ghost') _run('sudo unzip -uo /opt/ -d /opt/ghost',error_message='Failed unzipping ghost')
def writeConfig(subject=None): def writeConfig(subject=None):
...@@ -66,17 +66,6 @@ def writeConfig(subject=None): ...@@ -66,17 +66,6 @@ def writeConfig(subject=None):
_run('sudo mv {0} {1}'.format(, CONFIG_PATH), _run('sudo mv {0} {1}'.format(, CONFIG_PATH),
error_message='Failed to write to {0}.'.format(CONFIG_PATH)) error_message='Failed to write to {0}.'.format(CONFIG_PATH))
def start(subject=None):
pwd = os.getcwd()
_run('sudo /usr/bin/npm install',error_message='Failed running npm install')
_run('sudo nohup /usr/bin/npm start > /dev/null 2>&1 &',error_message='Failed running npm start')
def stop(): def stop():
_run('sudo killall node',error_message='Failed killing nodejs') _run('sudo killall node',error_message='Failed killing nodejs')
#!/bin/bash -e
ctx logger info "Starting ghost"
ctx logger debug "${COMMAND}"
cd /opt/ghost
sudo /usr/bin/npm install
sudo nohup /usr/bin/npm start > /dev/null 2>&1 &
cd $cwd
ctx logger info "Started ghost"
\ No newline at end of file
...@@ -52,12 +52,7 @@ node_types: ...@@ -52,12 +52,7 @@ node_types:
invocation: invocation:
default: default:
function: configure function: configure
start: start: scripts/ghost/
implementation: scripts/ghost/
function: start
stop: stop:
implementation: scripts/ghost/ implementation: scripts/ghost/
inputs: inputs:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment