diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ce133cd --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2014 Zapty Inc, Arvind Agarwal & the Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/bin/forever-service b/bin/forever-service index cd1fd59..2f82a42 100755 --- a/bin/forever-service +++ b/bin/forever-service @@ -7,7 +7,7 @@ platforms.get(function(err, platform){ console.log('forever-service version '+require('../package.json').version+'\n'); if(err || !platform){ console.error('This platform is not yet supported by forever-service'); - console.error('To help us add this platform, please contibute to https://github.com/zapty/forever-service'); + console.error('To help us add this platform, please contibute to https://github.com/zapty/forever-service\n'); return; } @@ -143,6 +143,16 @@ platforms.get(function(err, platform){ }); - program.parse(process.argv); + + var result = program.parse(process.argv); + if(!(result.args && result.args.length > 1 && result.args[1] && typeof result.args[1]==='object')){ + //If command line arguments are invalid display help + console.error("Invalid arguments!"); + program.outputHelp(); + console.log(' Command help:\n') + console.log(' forever-service install --help'); + console.log(' forever-service delete --help\n'); + } + }); diff --git a/package.json b/package.json index 564f249..0a36fca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "forever-service", - "version": "0.4.0", + "version": "0.4.1", "preferGlobal": "true", "description": "Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS", "main": "lib/api.js",