use blade as conmmands template (#444)

* use blade as conmmands template

* fix lint

* fix ssl
This commit is contained in:
Saeed Vaziry
2025-01-27 21:27:58 +01:00
committed by GitHub
parent a73476c1dd
commit cdbde063f0
208 changed files with 1080 additions and 1012 deletions

View File

@ -2,17 +2,18 @@
namespace App\SSH\PHPMyAdmin;
use App\Exceptions\SSHError;
use App\Models\Site;
use App\SSH\HasScripts;
class PHPMyAdmin
{
use HasScripts;
/**
* @throws SSHError
*/
public function install(Site $site): void
{
$site->server->ssh($site->user)->exec(
$this->getScript('install.sh', [
view('ssh.phpmyadmin.install', [
'version' => $site->type_data['version'],
'path' => $site->path,
]),

View File

@ -1,29 +0,0 @@
if ! rm -rf phpmyadmin; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! rm -rf __path__; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! wget https://files.phpmyadmin.net/phpMyAdmin/__version__/phpMyAdmin-__version__-all-languages.zip; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! unzip phpMyAdmin-__version__-all-languages.zip; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! rm -rf phpMyAdmin-__version__-all-languages.zip; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! mv phpMyAdmin-__version__-all-languages __path__; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! mv __path__/config.sample.inc.php __path__/config.inc.php; then
echo 'VITO_SSH_ERROR' && exit 1
fi
echo "PHPMyAdmin installed!"