-
-
Save jmaupetit/5534387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Casper script to restart Alwaysdata processes. | |
* | |
* Usage: | |
* $ casperjs kill.js [email protected] mysecretpassword | |
*/ | |
var casper = require('casper').create(); | |
casper.start("https://admin.alwaysdata.com/login/"); | |
casper.then(function() { | |
this.fill('#login form', { login: casper.cli.get(0), password: casper.cli.get(1) }, true); | |
}); | |
casper.then(function() { | |
if (this.visible("#loginmsg")) { | |
this.die('incorrect authentication'); | |
} | |
}); | |
casper.thenOpen('https://admin.alwaysdata.com/advanced/processes/restart/'); | |
casper.run(function() { | |
this.echo('processes restarted', 'INFO').exit(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment