tylercd100/php-rebooter

This package will allow you to reboot, boot, and shutdown your servers remotely.

2.0.0 2016-04-21 21:08 UTC

This package is auto-updated.

Last update: 2024-12-12 10:05:54 UTC


README

Latest Version Software License Build Status Scrutinizer Code Quality Code Coverage Dependency Status Total Downloads

This package will allow you to reboot, boot, and shutdown your servers remotely.

Currently supported:

Planned support for:

Installation

Install via composer - In the terminal:

composer require tylercd100/php-rebooter

Usage

Linode, DigitalOcean and Vultr

use Tylercd100\Rebooter\Drivers\Api\Linode;
use Tylercd100\Rebooter\Drivers\Api\DigitalOcean; // DigitalOcean takes the same parameters as Linode
use Tylercd100\Rebooter\Drivers\Api\Vultr;        // Vultr takes the same parameters as Linode

$token = "secret";
$server_id = 1234;

$server = new Linode($token,$server_id);

$server->reboot();
# or $server->boot();
# or $server->shutdown();

SSH Password

use Tylercd100\Rebooter\Drivers\Ssh\Password;

$host = "your-server.com";
$user = "your-username";
$pass = "your-secret-password";
$port = 22; // The port parameter is optional and will default to 22

$server = new Password($host,$user,$pass,$port);

$server->reboot();
# or $server->shutdown();
# or $server->boot(); // Will not work as you cannot boot a powered down maching using SSH