diff --git a/lib/process/index.js b/lib/process/index.js index 7b3c5f5f4..9a25dd23a 100644 --- a/lib/process/index.js +++ b/lib/process/index.js @@ -41,8 +41,10 @@ module.exports = BaseProcess = CoreObject.extend({ // base implementation - does nothing }, - error: function error() { - // base implementation - does nothing + error: function error(error) { + // To make sure errors get output if there's no error + // implementation, we throw the error here. + throw error; }, setup: function setup() { diff --git a/lib/process/systemd/ghost.service.template b/lib/process/systemd/ghost.service.template index f0e944075..72feb13aa 100644 --- a/lib/process/systemd/ghost.service.template +++ b/lib/process/systemd/ghost.service.template @@ -3,13 +3,12 @@ Description=Ghost systemd service for blog: <%= name %> # Documentation=add documentation link here [Service] -Type=notify -NotifyAccess=all +Type=simple WorkingDirectory=<%= dir %> User=<%= user %> Environment="NODE_ENV=<%= environment %>" ExecStart=<%= ghost_exec_path %> run -Restart=on-failure +Restart=always [Install] WantedBy=multi-user.target diff --git a/lib/process/systemd/index.js b/lib/process/systemd/index.js index de90b7994..472451cf5 100644 --- a/lib/process/systemd/index.js +++ b/lib/process/systemd/index.js @@ -51,11 +51,5 @@ module.exports = BaseProcess.extend({ execSync('systemctl stop ' + this.service, { stdio: ['inherit', 'inherit', 'inherit'] }); - }, - - success: function success() { - // This seems to work better than execSync, probably because it's - // asynchronous and thus doesn't interfere with the event loop - require('child_process').exec('systemd-notify --ready'); } });