Skip to content

Commit

Permalink
Fxes
Browse files Browse the repository at this point in the history
  • Loading branch information
PadowYT2 committed Feb 5, 2023
1 parent 1a417fc commit b1be971
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 76 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

.vscode/sftp.json
.vscode/sftp.json
110 changes: 55 additions & 55 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
{
"name": "wemx/installer",
"minimum-stability": "stable",
"prefer-stable": true,
"description": "WemX Installer",
"homepage": "https://wemx.net",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "GIGABAIT",
"email": "xgigabaitx@gmail.com",
"role": "Head Developer"
},
{
"name": "PadowYT2",
"email": "me@padow.ru",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"Wemx\\Installer\\": "src"
}
},
"require": {
"awsc/awsc-send-sdk": "*",
"stripe/stripe-php": "*",
"cloudflare/sdk": "*"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Wemx\\Installer\\CommandsServiceProvider"
],
"aliases": {
"Bill": "Pterodactyl\\Models\\Billing\\Bill",
"BFileEditor": "Wemx\\Installer\\FileEditor"
}
}
},
"scripts": {
"post-package-install": [
"php artisan vendor:publish --tag=wemx-backup --force"
],
"post-package-update": [
"php artisan vendor:publish --tag=wemx-backup --force"
],
"post-autoload-dump": [
"php artisan vendor:publish --tag=wemx-backup --force"
]
}
}
"name": "wemx/installer",
"minimum-stability": "stable",
"prefer-stable": true,
"description": "WemX Installer",
"homepage": "https://wemx.net",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "GIGABAIT",
"email": "xgigabaitx@gmail.com",
"role": "Head Developer"
},
{
"name": "PadowYT2",
"email": "me@padow.ru",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"Wemx\\Installer\\": "src"
}
},
"require": {
"awsc/awsc-send-sdk": "*",
"stripe/stripe-php": "*",
"cloudflare/sdk": "*"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Wemx\\Installer\\CommandsServiceProvider"
],
"aliases": {
"Bill": "Pterodactyl\\Models\\Billing\\Bill",
"BFileEditor": "Wemx\\Installer\\FileEditor"
}
}
},
"scripts": {
"post-package-install": [
"php artisan vendor:publish --tag=wemx-backup --force"
],
"post-package-update": [
"php artisan vendor:publish --tag=wemx-backup --force"
],
"post-autoload-dump": [
"php artisan vendor:publish --tag=wemx-backup --force"
]
}
}
2 changes: 1 addition & 1 deletion config/aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

return [
'Bill' => \Pterodactyl\Models\Billing\Bill::class,
];
];
8 changes: 5 additions & 3 deletions config/wemx-backup.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

return [
'backup_directory' => '', // /home/backup/panel
'autobackup' => true, // true/false
'backup_directory' => '',
// /home/backup/panel
'autobackup' => true,
// true/false
'autobackup_cron' => '*/5 * * * *', // hours
];
];
6 changes: 3 additions & 3 deletions src/Commands/BackupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private function createPanelBackup($name)

$files = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($panel_directory),
\RecursiveIteratorIterator::LEAVES_ONLY
\RecursiveIteratorIterator::LEAVES_ONLY
);
$this->info('Creating a panel backup...');
foreach ($files as $name => $file) {
Expand Down Expand Up @@ -218,7 +218,7 @@ private function restoreDbBackup($file)
$this->info('The database backup has been successfully restored!');
}

private function backupPrepare(\DirectoryIterator$backups)
private function backupPrepare(\DirectoryIterator $backups)
{
$data = [];
foreach ($backups as $fileinfo) {
Expand All @@ -237,4 +237,4 @@ private function createDir($path)
mkdir($path, 0777, true);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Commands/VersionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class VersionCommand extends Command

public function handle()
{
if (!file_exists(base_path() . '/app/Console/Commands/BillingModule.php')) {
if (!file_exists('app/Models/Billing/Bill.php')) {
return $this->info('Billing Module is not installed. To use this command, install the module');
}

Expand Down
20 changes: 10 additions & 10 deletions src/CommandsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ public function boot()
$this->commands([
InstallCommand::class,
HelpCommand::class,
UninstallCommand::class,
FixCommand::class,
YarnCommand::class,
InstallphpMyAdmin::class,
CreateMySQLUser::class,
DeleteMySQLUser::class,
LicenseCommand::class,
BackupCommand::class,
UninstallCommand::class,
FixCommand::class,
YarnCommand::class,
InstallphpMyAdmin::class,
CreateMySQLUser::class,
DeleteMySQLUser::class,
LicenseCommand::class,
BackupCommand::class,
VersionCommand::class
]);
]);
}

$this->publishes([__DIR__ . '/../config/wemx-backup.php' => config_path('wemx-backup.php')], 'wemx-backup');
Expand Down Expand Up @@ -77,4 +77,4 @@ private function mergeConfig()
}
return;
}
}
}
2 changes: 1 addition & 1 deletion src/FileEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ public static function appendAfter($file, $word, $text)
}
}
}
}
}

0 comments on commit b1be971

Please sign in to comment.