Skip to content

Commit

Permalink
Run all scripts from the dest directory
Browse files Browse the repository at this point in the history
  • Loading branch information
monsur committed Apr 20, 2015
1 parent 0a57923 commit 4e89beb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,4 +2,5 @@
coverage.html
dest
node_modules
sonos-now-playing.log
.DS_Store
3 changes: 1 addition & 2 deletions Gruntfile.js
Expand Up @@ -49,8 +49,7 @@ module.exports = function(grunt) {
server: {
files: [
{expand: true, cwd: 'src/', src: ['config.json'], dest: 'dest/', flatten: true},
{expand: true, cwd: 'src/server/', src: ['*.js'], dest: 'dest/', flatten: true},
{expand: true, cwd: 'src/server/', src: ['*.sh'], dest: 'dest/', flatten: true}
{expand: true, cwd: 'src/server/', src: ['*.js'], dest: 'dest/', flatten: true}
]
},
client: {
Expand Down
3 changes: 2 additions & 1 deletion bin/run.sh
@@ -1,5 +1,6 @@
#!/bin/sh
/opt/node/bin/node /home/pi/Documents/sonos-now-playing/dest/app.js &
cd /home/pi/Documents/sonos-now-playing/dest
/opt/node/bin/node ./app.js &
response=0
while [ $response -ne 200 ]
do
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/server/screensaver.js
Expand Up @@ -33,13 +33,13 @@ Screensaver.prototype.check = function() {
Screensaver.prototype.sleep = function() {
this.isSleeping = true;
Logger.info("Starting screensaver");
exec('/home/pi/Documents/sonos-now-playing/dest/sleep.sh', Screensaver.execHandler);
exec('../bin/sleep.sh', Screensaver.execHandler);
};

Screensaver.prototype.wake = function() {
this.isSleeping = false;
Logger.info("Stopping screensaver");
exec('/home/pi/Documents/sonos-now-playing/dest/wake.sh', Screensaver.execHandler);
exec('../bin/wake.sh', Screensaver.execHandler);
};

module.exports = Screensaver;
Expand Down

0 comments on commit 4e89beb

Please sign in to comment.