Tuesday, 29 January 2013

Serverlove API - Batch File

How is it possible to start/stop a remote server?  Easy.  Now a simple batch-script (which I will convert to exe) and job is done, clickable icons to turn on and off VPN server and GNS3!

@echo OFF

echo Stopping VPN Server....

@echo OFF
curl -v -i -H "Accept: application/json" -H "Content-Type: application/json" -u
username:password -X POST -k
https://api.z1-man.serverlove.com/servers/server-id/stop > nul 2>&1

And do now we can simply run a batch file to get the server running.  Pretty straight-forward, but it needs to be improved!

The BAT file in action.

No comments:

Post a comment

Found this pointless and feel you must comment? Really, there is no need, we are fully aware of the pointlessness of this article. But if you must...