18 | */
19 | public function definition(): array
20 | {
21 | return [
22 | 'from' => $this->faker->word,
23 | 'to' => $this->faker->url,
24 | 'mode' => $this->faker->randomElement([301, 302, 307, 308]),
25 | 'status' => RedirectStatus::READY,
26 | ];
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/database/factories/ScriptExecutionFactory.php:
--------------------------------------------------------------------------------
1 |
12 | */
13 | class ScriptExecutionFactory extends Factory
14 | {
15 | protected $model = ScriptExecution::class;
16 |
17 | public function definition(): array
18 | {
19 | return [
20 | 'user' => 'root',
21 | 'variables' => [],
22 | 'status' => ScriptExecutionStatus::EXECUTING,
23 | 'created_at' => Carbon::now(),
24 | 'updated_at' => Carbon::now(),
25 | ];
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/database/factories/ScriptFactory.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class ScriptFactory extends Factory
13 | {
14 | protected $model = Script::class;
15 |
16 | public function definition(): array
17 | {
18 | return [
19 | 'name' => $this->faker->name(),
20 | 'content' => 'ls -la',
21 | 'created_at' => Carbon::now(),
22 | 'updated_at' => Carbon::now(),
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/factories/ServerLogFactory.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class ServerLogFactory extends Factory
12 | {
13 | protected $model = ServerLog::class;
14 |
15 | public function definition(): array
16 | {
17 | return [
18 | 'type' => 'test-log',
19 | 'name' => 'test.log',
20 | 'disk' => 'server-logs',
21 | ];
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/database/factories/ServerProviderFactory.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class ServerProviderFactory extends Factory
13 | {
14 | protected $model = ServerProvider::class;
15 |
16 | public function definition(): array
17 | {
18 | return [
19 | 'profile' => $this->faker->word(),
20 | 'provider' => $this->faker->randomElement(config('core.server_providers')),
21 | 'credentials' => [],
22 | 'connected' => 1,
23 | 'user_id' => User::factory(),
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/database/factories/ServiceFactory.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class ServiceFactory extends Factory
12 | {
13 | protected $model = Service::class;
14 |
15 | public function definition(): array
16 | {
17 | return [
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/database/factories/SiteFactory.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class SiteFactory extends Factory
13 | {
14 | protected $model = Site::class;
15 |
16 | public function definition(): array
17 | {
18 | return [
19 | 'type' => SiteType::LARAVEL,
20 | 'domain' => 'test.com',
21 | 'web_directory' => '/',
22 | 'path' => '/home',
23 | 'status' => 'ready',
24 | 'progress' => '100',
25 | 'php_version' => '8.2',
26 | 'branch' => 'main',
27 | 'user' => 'vito',
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/database/factories/SshKeyFactory.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class SshKeyFactory extends Factory
12 | {
13 | protected $model = SshKey::class;
14 |
15 | public function definition(): array
16 | {
17 | return [
18 | 'name' => $this->faker->name(),
19 | 'public_key' => 'public-key-content',
20 | ];
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/database/factories/StorageProviderFactory.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 | class StorageProviderFactory extends Factory
12 | {
13 | public function definition(): array
14 | {
15 | return [
16 | 'profile' => $this->faker->word(),
17 | 'provider' => $this->faker->randomElement(config('core.storage_providers')),
18 | 'credentials' => [
19 | 'token' => 'test-token',
20 | ],
21 | 'user_id' => User::factory(),
22 | ];
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/database/factories/TagFactory.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class TagFactory extends Factory
13 | {
14 | protected $model = Tag::class;
15 |
16 | public function definition(): array
17 | {
18 | return [
19 | 'project_id' => 1,
20 | 'created_at' => Carbon::now(), //
21 | 'updated_at' => Carbon::now(),
22 | 'name' => $this->faker->randomElement(['production', 'staging', 'development']),
23 | 'color' => $this->faker->randomElement(config('core.tag_colors')),
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/database/factories/WorkerFactory.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class WorkerFactory extends Factory
13 | {
14 | protected $model = Worker::class;
15 |
16 | public function definition(): array
17 | {
18 | return [
19 | 'command' => 'php artisan queue:work',
20 | 'user' => 'vito',
21 | 'auto_start' => 1,
22 | 'auto_restart' => 1,
23 | 'numprocs' => 1,
24 | 'redirect_stderr' => 1,
25 | 'stdout_logfile' => 'file.log',
26 | 'status' => WorkerStatus::CREATING,
27 | ];
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
13 | $table->string('token');
14 | $table->timestamp('created_at')->nullable();
15 | });
16 | }
17 |
18 | public function down(): void
19 | {
20 | Schema::dropIfExists('password_reset_tokens');
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/database/migrations/2021_06_28_085814_create_source_controls_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->string('provider');
14 | $table->json('provider_data')->nullable();
15 | $table->longText('access_token')->nullable();
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | public function down(): void
21 | {
22 | Schema::dropIfExists('source_controls');
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/database/migrations/2021_07_03_133319_create_databases_table.php:
--------------------------------------------------------------------------------
1 | id();
14 | $table->unsignedBigInteger('server_id');
15 | $table->string('name');
16 | $table->string('status')->default(DatabaseStatus::CREATING);
17 | $table->timestamps();
18 | });
19 | }
20 |
21 | public function down(): void
22 | {
23 | Schema::dropIfExists('databases');
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/database/migrations/2021_08_13_213657_create_deployment_scripts_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->unsignedBigInteger('site_id');
14 | $table->string('name')->nullable();
15 | $table->longText('content')->nullable();
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | public function down(): void
21 | {
22 | Schema::dropIfExists('deployment_scripts');
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/database/migrations/2021_08_29_210204_create_ssh_keys_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->unsignedBigInteger('user_id');
14 | $table->string('name');
15 | $table->longText('public_key');
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | public function down(): void
21 | {
22 | Schema::dropIfExists('ssh_keys');
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/database/migrations/2021_08_30_174511_create_server_ssh_keys_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->unsignedBigInteger('server_id');
14 | $table->unsignedBigInteger('ssh_key_id');
15 | $table->string('status');
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | public function down(): void
21 | {
22 | Schema::dropIfExists('server_ssh_keys');
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/database/migrations/2021_12_09_062430_create_scripts_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->unsignedBigInteger('user_id');
14 | $table->string('name');
15 | $table->longText('content');
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | public function down(): void
21 | {
22 | Schema::dropIfExists('scripts');
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/database/migrations/2023_07_21_210213_update_firewall_rules_table.php:
--------------------------------------------------------------------------------
1 | longText('ssh_key')->nullable()->after('repository');
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('sites', function (Blueprint $table): void {
19 | $table->dropColumn('ssh_key');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_07_30_163805_add_url_to_source_controls_table.php:
--------------------------------------------------------------------------------
1 | string('url')->nullable()->after('provider');
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('source_controls', function (Blueprint $table): void {
19 | $table->dropColumn('url');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_07_30_200348_add_profile_to_source_controls_table.php:
--------------------------------------------------------------------------------
1 | string('profile')->after('provider')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('source_controls', function (Blueprint $table): void {
19 | $table->dropColumn('profile');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_07_30_205328_add_source_control_id_to_sites_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('source_control_id')->nullable()->after('source_control');
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('sites', function (Blueprint $table): void {
19 | $table->dropColumn('source_control_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_08_17_231824_update_backups_table.php:
--------------------------------------------------------------------------------
1 | dropColumn('name');
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('backups', function (Blueprint $table): void {
19 | $table->string('name')->nullable();
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_08_25_183201_update_backup_files_table.php:
--------------------------------------------------------------------------------
1 | string('restored_to')->after('status')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('backup_files', function (Blueprint $table): void {
19 | $table->dropColumn('restored_to');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2023_10_01_120250_create_projects_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->bigInteger('user_id');
14 | $table->string('name');
15 | $table->timestamps();
16 | });
17 | }
18 |
19 | public function down(): void
20 | {
21 | Schema::dropIfExists('projects');
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/database/migrations/2024_01_01_232932_update_servers_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('project_id')->nullable()->after('id');
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('servers', function (Blueprint $table): void {
19 | $table->dropColumn('project_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_06_24_211155_add_project_id_to_notification_channels_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('project_id')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('notification_channels', function (Blueprint $table): void {
19 | $table->dropColumn('project_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_06_25_202655_add_project_id_to_storage_providers_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('project_id')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('storage_providers', function (Blueprint $table): void {
19 | $table->dropColumn('project_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_06_25_212812_add_project_id_to_server_providers_table.php:
--------------------------------------------------------------------------------
1 | unsignedBigInteger('project_id')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('server_providers', function (Blueprint $table): void {
19 | $table->dropColumn('project_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_08_09_180021_create_tags_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->unsignedBigInteger('project_id');
14 | $table->string('name');
15 | $table->string('color');
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | public function down(): void
21 | {
22 | Schema::dropIfExists('tags');
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/database/migrations/2024_08_09_181239_create_taggables_table.php:
--------------------------------------------------------------------------------
1 | id();
13 | $table->unsignedBigInteger('tag_id');
14 | $table->unsignedBigInteger('taggable_id');
15 | $table->string('taggable_type');
16 | $table->timestamps();
17 | });
18 | }
19 |
20 | public function down(): void
21 | {
22 | Schema::dropIfExists('taggables');
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_04_190341_add_soft_deletes_to_databases.php:
--------------------------------------------------------------------------------
1 | softDeletes();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('databases', function (Blueprint $table): void {
19 | $table->dropSoftDeletes();
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_05_094650_add_soft_deletes_to_source_controls.php:
--------------------------------------------------------------------------------
1 | softDeletes();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('source_controls', function (Blueprint $table): void {
19 | $table->dropSoftDeletes();
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_091631_add_log_id_to_ssls.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('log_id')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('ssls', function (Blueprint $table): void {
19 | $table->dropColumn('log_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_160213_add_soft_deletes_to_ssh_keys.php:
--------------------------------------------------------------------------------
1 | softDeletes();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('ssh_keys', function (Blueprint $table): void {
19 | $table->dropSoftDeletes();
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_162253_add_project_id_to_scripts.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('project_id')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('scripts', function (Blueprint $table): void {
19 | $table->dropColumn('project_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2024_10_06_174115_add_server_id_to_script_executions.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('server_id')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('script_executions', function (Blueprint $table): void {
19 | $table->dropColumn('server_id');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2025_01_12_173141_add_user_to_sites.php:
--------------------------------------------------------------------------------
1 | string('user')->default(config('core.ssh_user'));
16 | });
17 | }
18 |
19 | /**
20 | * Reverse the migrations.
21 | */
22 | public function down(): void
23 | {
24 | Schema::table('sites', function (Blueprint $table): void {
25 | $table->dropColumn('user');
26 | });
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/database/migrations/2025_01_25_193815_drop_telescope_tables.php:
--------------------------------------------------------------------------------
1 | getConnection());
11 |
12 | $schema->dropIfExists('telescope_entries_tags');
13 | $schema->dropIfExists('telescope_entries');
14 | $schema->dropIfExists('telescope_monitoring');
15 | }
16 |
17 | public function down(): void
18 | {
19 | //
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/database/migrations/2025_01_27_181512_add_force_ssl_to_sites_table.php:
--------------------------------------------------------------------------------
1 | boolean('force_ssl')->default(false);
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('sites', function (Blueprint $table): void {
19 | $table->dropColumn('force_ssl');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2025_01_29_192733_add_email_to_ssls_table.php:
--------------------------------------------------------------------------------
1 | string('email')->nullable();
13 | });
14 | }
15 |
16 | public function down(): void
17 | {
18 | Schema::table('ssls', function (Blueprint $table): void {
19 | $table->dropColumn('email');
20 | });
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2025_03_16_081225_rename_queues_to_workers.php:
--------------------------------------------------------------------------------
1 | unsignedInteger('site_id')->nullable()->change();
14 | });
15 | }
16 |
17 | public function down(): void
18 | {
19 | Schema::rename('workers', 'queues');
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/database/seeders/CronJobsSeeder.php:
--------------------------------------------------------------------------------
1 | create([
17 | 'server_id' => $server->id,
18 | 'command' => 'php /home/vito/'.$server->project->name.'.com/artisan schedule:run',
19 | ]);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/database/seeders/ProjectsSeeder.php:
--------------------------------------------------------------------------------
1 | create([
13 | 'name' => 'vitodeploy',
14 | ]);
15 | Project::query()->create([
16 | 'name' => 'laravel',
17 | ]);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/database/seeders/SshKeysSeeder.php:
--------------------------------------------------------------------------------
1 | create([
18 | 'user_id' => $server->user_id,
19 | 'name' => 'id_rsa',
20 | 'public_key' => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ',
21 | ]);
22 | $server->sshKeys()->attach($sshKey, [
23 | 'status' => SshKeyStatus::ADDED,
24 | ]);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/database/seeders/TagsSeeder.php:
--------------------------------------------------------------------------------
1 | tags()->create([
16 | 'name' => 'production',
17 | 'color' => 'red',
18 | ]);
19 | $project->tags()->create([
20 | 'name' => 'staging',
21 | 'color' => 'yellow',
22 | ]);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/seeders/UsersSeeder.php:
--------------------------------------------------------------------------------
1 | create([
14 | 'name' => 'Demo User',
15 | 'email' => 'demo@vitodeploy.com',
16 | 'current_project_id' => Project::query()->first()->id,
17 | ]);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/docker/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | vito:
3 | build:
4 | context: ../
5 | dockerfile: docker/Dockerfile
6 | environment:
7 | NAME: "vito"
8 | EMAIL: "vito@example.com"
9 | PASSWORD: "password"
10 | APP_KEY: "base64:UodiJrx3DkcMlizmoimNlDn+yd4q5f2VbkBay19rJwM="
11 | APP_PORT: 8000
12 | extra_hosts:
13 | - 'host.docker.internal:host-gateway'
14 | ports:
15 | - '${APP_PORT:-80}:80'
16 | - '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
17 | volumes:
18 | - "vito-storage:/var/www/html/storage"
19 | volumes:
20 | vito-storage:
21 | driver: local
22 |
--------------------------------------------------------------------------------
/docker/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | listen [::]:80;
4 | server_name _;
5 | root /var/www/html/public;
6 |
7 | add_header X-Frame-Options "SAMEORIGIN";
8 | add_header X-Content-Type-Options "nosniff";
9 |
10 | index index.php;
11 |
12 | charset utf-8;
13 |
14 | location / {
15 | try_files $uri $uri/ /index.php?$query_string;
16 | }
17 |
18 | location ~ \.php$ {
19 | include snippets/fastcgi-php.conf;
20 | fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
21 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
22 | include fastcgi_params;
23 | }
24 |
25 | location ~ /\.(?!well-known).* {
26 | deny all;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docker/php.ini:
--------------------------------------------------------------------------------
1 | [PHP]
2 | post_max_size = 100M
3 | upload_max_filesize = 100M
4 |
--------------------------------------------------------------------------------
/docker/supervisord.conf:
--------------------------------------------------------------------------------
1 | [supervisord]
2 | nodaemon=true
3 | user=root
4 | logfile=/var/log/supervisor/supervisord.log
5 | pidfile=/var/run/supervisord.pid
6 | redirect_stderr=true
7 |
8 | [program:worker]
9 | user=root
10 | autostart=1
11 | autorestart=1
12 | numprocs=1
13 | command=/usr/bin/php /var/www/html/artisan queue:work --sleep=3 --backoff=0 --queue=default,ssh,ssh-long --timeout=3600 --tries=1
14 | redirect_stderr=true
15 | stdout_logfile=/var/www/html/storage/logs/worker.log
16 | stopwaitsecs=3600
17 |
--------------------------------------------------------------------------------
/lang/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "servers.create.public_key_text": "mkdir -p /root/.ssh && touch /root/.ssh/authorized_keys && echo ':public_key' >> /root/.ssh/authorized_keys",
3 | "servers.create.public_key_warning": "Your server needs to have a new unused installation of supported operating systems and must have a root user. To get started, add our public key to /root/.ssh/authorized_keys file by running the bellow command on your server as root.",
4 | "server_providers.plan": ":name - :cpu Cores - :memory Memory - :disk Disk"
5 | }
6 |
--------------------------------------------------------------------------------
/phpstan.neon:
--------------------------------------------------------------------------------
1 | includes:
2 | - vendor/larastan/larastan/extension.neon
3 | - vendor/nesbot/carbon/extension.neon
4 | parameters:
5 | paths:
6 | - app
7 | - config
8 | - bootstrap
9 | - database/factories
10 | level: 7
11 |
--------------------------------------------------------------------------------
/pint.json:
--------------------------------------------------------------------------------
1 | {
2 | "preset": "laravel",
3 | "exclude": ["resources/views/ssh"]
4 | }
5 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews -Indexes
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Handle Authorization Header
9 | RewriteCond %{HTTP:Authorization} .
10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11 |
12 | # Redirect Trailing Slashes If Not A Folder...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_URI} (.+)/$
15 | RewriteRule ^ %1 [L,R=301]
16 |
17 | # Send Requests To Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/public/api-docs/images/navbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/api-docs/images/navbar.png
--------------------------------------------------------------------------------
/public/build/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "resources/css/filament/app/theme.css": {
3 | "file": "assets/theme-f92da083.css",
4 | "isEntry": true,
5 | "src": "resources/css/filament/app/theme.css"
6 | },
7 | "resources/js/app.js": {
8 | "file": "assets/app-58d76f18.js",
9 | "isEntry": true,
10 | "src": "resources/js/app.js"
11 | }
12 | }
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon.ico
--------------------------------------------------------------------------------
/public/favicon/android-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-144x144.png
--------------------------------------------------------------------------------
/public/favicon/android-icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-192x192.png
--------------------------------------------------------------------------------
/public/favicon/android-icon-36x36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-36x36.png
--------------------------------------------------------------------------------
/public/favicon/android-icon-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-48x48.png
--------------------------------------------------------------------------------
/public/favicon/android-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-72x72.png
--------------------------------------------------------------------------------
/public/favicon/android-icon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-96x96.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-114x114.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-120x120.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-144x144.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-152x152.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-180x180.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-57x57.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-60x60.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-72x72.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-76x76.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-precomposed.png
--------------------------------------------------------------------------------
/public/favicon/apple-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon.png
--------------------------------------------------------------------------------
/public/favicon/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 | #ffffff
--------------------------------------------------------------------------------
/public/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/public/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/public/favicon/favicon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon-96x96.png
--------------------------------------------------------------------------------
/public/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon.ico
--------------------------------------------------------------------------------
/public/favicon/ms-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-144x144.png
--------------------------------------------------------------------------------
/public/favicon/ms-icon-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-150x150.png
--------------------------------------------------------------------------------
/public/favicon/ms-icon-310x310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-310x310.png
--------------------------------------------------------------------------------
/public/favicon/ms-icon-70x70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-70x70.png
--------------------------------------------------------------------------------
/public/js/filament/forms/components/textarea.js:
--------------------------------------------------------------------------------
1 | function r({initialHeight:t,shouldAutosize:i,state:s}){return{state:s,wrapperEl:null,init:function(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight:function(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=t+"rem")},resize:function(){if(this.setInitialHeight(),this.$el.scrollHeight<=0)return;let e=this.$el.scrollHeight+"px";this.wrapperEl.style.height!==e&&(this.wrapperEl.style.height=e)},setUpResizeObserver:function(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{r as default};
2 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/rector.php:
--------------------------------------------------------------------------------
1 | withPaths([
9 | __DIR__.'/app',
10 | __DIR__.'/bootstrap/app.php',
11 | __DIR__.'/config',
12 | __DIR__.'/database',
13 | __DIR__.'/public',
14 | ])
15 | ->withPreparedSets(
16 | deadCode: true,
17 | codeQuality: true,
18 | typeDeclarations: true,
19 | privatization: true,
20 | earlyReturn: true,
21 | strictBooleans: true,
22 | )
23 | ->withPhpSets();
24 |
--------------------------------------------------------------------------------
/resources/css/app.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | [x-cloak] {
6 | display: none !important;
7 | }
8 |
9 | body {
10 | @apply text-gray-700 dark:text-gray-300;
11 | }
12 |
--------------------------------------------------------------------------------
/resources/svg/custom.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/disk.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/resources/svg/dropbox.svg:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/resources/svg/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/force-ssl-disabled.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/resources/svg/force-ssl-enabled.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/resources/svg/ftp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/hetzner.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/local.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/resources/svg/logo.png
--------------------------------------------------------------------------------
/resources/svg/memory.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/resources/svg/monitoring.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/plug.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/resources/svg/remote-monitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/s3.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/resources/svg/server.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/ufw.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/vitomonitor.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/svg/www.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/views/components/app-version.blade.php:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/resources/views/components/console-view.blade.php:
--------------------------------------------------------------------------------
1 | merge(["class" => "font-mono relative h-[500px] w-full overflow-auto whitespace-pre-line rounded-xl border border-gray-200 bg-black p-5 text-gray-50 dark:border-gray-800"]) }}
3 | >
4 | {{ $slot }}
5 |
6 |
--------------------------------------------------------------------------------
/resources/views/components/container.blade.php:
--------------------------------------------------------------------------------
1 |
6 | {!! $content !!}
7 |
8 |
--------------------------------------------------------------------------------
/resources/views/components/dynamic-widget.blade.php:
--------------------------------------------------------------------------------
1 | @livewire($widget, $params ?? [], key($widget))
2 |
--------------------------------------------------------------------------------
/resources/views/components/form.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/resources/views/components/infolist.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ $this->infolist }}
3 |
4 |
5 |
--------------------------------------------------------------------------------
/resources/views/components/link.blade.php:
--------------------------------------------------------------------------------
1 | {{ $text }}
2 |
--------------------------------------------------------------------------------
/resources/views/components/page.blade.php:
--------------------------------------------------------------------------------
1 | getExtraAttributesBag() }}>
2 |
3 | @if (method_exists($this, "getSecondSubNavigation") && count($this->getSecondSubNavigation()) > 0)
4 |
5 | @endif
6 |
7 | @foreach ($this->getWidgets() as $key => $widget)
8 | @livewire($widget[0], $widget[1] ?? [], key(class_basename($widget[0]) . "-" . $key))
9 | @endforeach
10 |
11 |
12 |
--------------------------------------------------------------------------------
/resources/views/components/progress-bar.blade.php:
--------------------------------------------------------------------------------
1 | @props(["value" => 0])
2 |
3 |
4 |
8 |
11 | {{ $value }}%
12 |
13 |
14 |
--------------------------------------------------------------------------------
/resources/views/fields/alert.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | {!! $getMessage() !!}
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/composer/composer-install.blade.php:
--------------------------------------------------------------------------------
1 | if ! cd {{ $path }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! php{{ $phpVersion }} /usr/local/bin/composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/cron/update.blade.php:
--------------------------------------------------------------------------------
1 | if ! echo '{!! $cron !!}' | sudo -u {{ $user }} crontab -; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo -u {{ $user }} crontab -l; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo 'cron updated!'
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/git/checkout.blade.php:
--------------------------------------------------------------------------------
1 | if ! cd {{ $path }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! git checkout -f {{ $branch }}; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/git/fetch-origin.blade.php:
--------------------------------------------------------------------------------
1 | if ! cd {{ $path }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! git fetch origin; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/available-updates.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
2 |
3 | AVAILABLE_UPDATES=$(sudo DEBIAN_FRONTEND=noninteractive apt list --upgradable | wc -l)
4 |
5 | echo "Available updates:$AVAILABLE_UPDATES"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/cleanup.blade.php:
--------------------------------------------------------------------------------
1 | # Update package lists
2 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
3 |
4 | # Remove unnecessary dependencies
5 | sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y
6 |
7 | # Clear package cache
8 | sudo DEBIAN_FRONTEND=noninteractive apt-get clean -y
9 |
10 | # Remove old configuration files
11 | sudo DEBIAN_FRONTEND=noninteractive apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
12 |
13 | # Clear temporary files
14 | sudo rm -rf /tmp/*
15 |
16 | # Clear journal logs
17 | sudo DEBIAN_FRONTEND=noninteractive journalctl --vacuum-time=1d
18 |
19 | echo "Cleanup completed."
20 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/create-user.blade.php:
--------------------------------------------------------------------------------
1 | export DEBIAN_FRONTEND=noninteractive
2 | echo "{{ $key }}" | sudo tee -a /root/.ssh/authorized_keys
3 | sudo useradd -p $(openssl passwd -1 {{ $password }}) {{ $user }}
4 | sudo usermod -aG sudo {{ $user }}
5 | echo "{{ $user }} ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
6 | sudo mkdir /home/{{ $user }}
7 | sudo mkdir /home/{{ $user }}/.ssh
8 | echo "{{ $key }}" | sudo tee -a /home/{{ $user }}/.ssh/authorized_keys
9 | sudo chown -R {{ $user }}:{{ $user }} /home/{{ $user }}
10 | sudo chsh -s /bin/bash {{ $user }}
11 | sudo su - {{ $user }} -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" <<< y
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/delete-file.blade.php:
--------------------------------------------------------------------------------
1 | rm -rf {{ $path }}
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/delete-isolated-user.blade.php:
--------------------------------------------------------------------------------
1 | sudo gpasswd -d {{ $serverUser }} {{ $user }}
2 | sudo userdel -r "{{ $user }}"
3 | echo "User {{ $user }} has been deleted."
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/delete-ssh-key.blade.php:
--------------------------------------------------------------------------------
1 | bash -c 'ssh_key_to_delete="$1"; sed -i "\#${ssh_key_to_delete//\//\\/}#d" /home/vito/.ssh/authorized_keys' bash '{{ $key }}'
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/deploy-ssh-key.blade.php:
--------------------------------------------------------------------------------
1 | if ! echo '{!! $key !!}' | sudo tee -a ~/.ssh/authorized_keys; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/download.blade.php:
--------------------------------------------------------------------------------
1 | if ! wget {{ $url }} -O {{ $path }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/edit-file.blade.php:
--------------------------------------------------------------------------------
1 | @if($sudo) sudo @endif tee {!! $path !!} << 'VITO_SSH_EOF' > /dev/null
2 | {!! $content !!}
3 | VITO_SSH_EOF
4 |
5 | if [ $? -eq 0 ]; then
6 | echo "Successfully wrote to {{ $path }}"
7 | else
8 | echo 'VITO_SSH_ERROR' && exit 1
9 | fi
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/extract.blade.php:
--------------------------------------------------------------------------------
1 | @php
2 | $extension = pathinfo($path, PATHINFO_EXTENSION);
3 | @endphp
4 |
5 | @if($extension === 'zip')
6 | unzip -o {{ $path }} -d {{ $destination }}
7 | @elseif($extension === 'tar'))
8 | tar -xf {{ $path }} -C {{ $destination }}
9 | @elseif(in_array($extension, ['gz', 'tar.gz']))
10 | tar -xzf {{ $path }} -C {{ $destination }}
11 | @elseif(in_array($extension, ['bz2', 'tar.bz2']))
12 | tar -xjf {{ $path }} -C {{ $destination }}
13 | @else
14 | echo "Unsupported archive format: {{ $extension }}"
15 | @endif
16 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/generate-ssh-key.blade.php:
--------------------------------------------------------------------------------
1 | ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/{{ $name }}
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/get-public-key.blade.php:
--------------------------------------------------------------------------------
1 | cat ~/.ssh/id_rsa.pub
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/install-dependencies.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common curl zip unzip git gcc openssl ufw
2 | git config --global user.email "{{ $email }}"
3 | git config --global user.name "{{ $name }}"
4 |
5 | # Install Node.js
6 | curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
7 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
8 | sudo DEBIAN_FRONTEND=noninteractive apt-get install nodejs -y
9 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/read-file.blade.php:
--------------------------------------------------------------------------------
1 | [ -f {{ $path }} ] && sudo cat {{ $path }}
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/read-ssh-key.blade.php:
--------------------------------------------------------------------------------
1 | cat ~/.ssh/{{ $name }}.pub
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/reboot.blade.php:
--------------------------------------------------------------------------------
1 | echo "Rebooting..."
2 |
3 | sudo reboot
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/resource-info.blade.php:
--------------------------------------------------------------------------------
1 | echo "load:$(uptime | awk -F'load average:' '{print $2}' | awk -F, '{print $1}' | tr -d ' ')"
2 | echo "memory_total:$(free -k | awk 'NR==2{print $2}')"
3 | echo "memory_used:$(free -k | awk 'NR==2{print $3}')"
4 | echo "memory_free:$(free -k | awk 'NR==2{print $7}')"
5 | echo "disk_total:$(df -BM / | awk 'NR==2{print $2}' | sed 's/M//')"
6 | echo "disk_used:$(df -BM / | awk 'NR==2{print $3}' | sed 's/M//')"
7 | echo "disk_free:$(df -BM / | awk 'NR==2{print $4}' | sed 's/M//')"
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/run-script.blade.php:
--------------------------------------------------------------------------------
1 | if ! cd {{ $path }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | {!! $script !!}
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/tail.blade.php:
--------------------------------------------------------------------------------
1 | sudo tail -n {{ $lines }} {{ $path }}
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/os/upgrade.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get clean
2 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
4 | sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
5 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/backup.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo DEBIAN_FRONTEND=noninteractive mysqldump -u root {{ $database }} > {{ $file }}.sql; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! DEBIAN_FRONTEND=noninteractive zip {{ $file }}.zip {{ $file }}.sql; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! rm {{ $file }}.sql; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/create-user.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "CREATE USER IF NOT EXISTS '{{ $username }}'@'{{ $host }}' IDENTIFIED BY '{{ $password }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo mariadb -e "FLUSH PRIVILEGES"; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "Command executed"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/create.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "CREATE DATABASE IF NOT EXISTS {{ $name }} CHARACTER SET '{{ $charset }}' COLLATE '{{ $collation }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Command executed"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/delete-user.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "DROP USER IF EXISTS '{{ $username }}'@'{{ $host }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo mariadb -e "FLUSH PRIVILEGES"; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "Command executed"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/delete.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "DROP DATABASE IF EXISTS {{ $name }}"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Command executed"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/get-charsets.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "SHOW COLLATION;";
2 | then
3 | echo 'VITO_SSH_ERROR' && exit 1
4 | fi
5 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/get-db-list.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "SELECT
2 | SCHEMA_NAME AS database_name,
3 | DEFAULT_CHARACTER_SET_NAME AS charset,
4 | DEFAULT_COLLATION_NAME AS collation
5 | FROM information_schema.SCHEMATA;";
6 | then
7 | echo 'VITO_SSH_ERROR' && exit 1
8 | fi
9 |
10 |
11 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/get-users-list.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "SELECT u.User,
2 | u.Host,
3 | (SELECT group_concat(distinct p.TABLE_SCHEMA)
4 | FROM information_schema.SCHEMA_PRIVILEGES p
5 | WHERE p.GRANTEE = concat('\'', u.User, '\'', '@', '\'', u.Host, '\'')) as Privileges
6 | FROM mysql.user u;";
7 | then
8 | echo 'VITO_SSH_ERROR' && exit 1
9 | fi
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/install-1011.blade.php:
--------------------------------------------------------------------------------
1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
2 |
3 | chmod +x mariadb_repo_setup
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \
6 | --mariadb-server-version="mariadb-10.11"
7 |
8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
9 |
10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y
11 |
12 | sudo systemctl unmask mysql.service
13 |
14 | sudo service mysql start
15 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/install-103.blade.php:
--------------------------------------------------------------------------------
1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
2 |
3 | chmod +x mariadb_repo_setup
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \
6 | --mariadb-server-version="mariadb-10.3"
7 |
8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
9 |
10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y
11 |
12 | sudo systemctl unmask mysql.service
13 |
14 | sudo service mysql start
15 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/install-104.blade.php:
--------------------------------------------------------------------------------
1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
2 |
3 | chmod +x mariadb_repo_setup
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \
6 | --mariadb-server-version="mariadb-10.4"
7 |
8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
9 |
10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y
11 |
12 | sudo systemctl unmask mysql.service
13 |
14 | sudo service mysql start
15 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/install-106.blade.php:
--------------------------------------------------------------------------------
1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
2 |
3 | chmod +x mariadb_repo_setup
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \
6 | --mariadb-server-version="mariadb-10.6"
7 |
8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
9 |
10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y
11 |
12 | sudo systemctl unmask mysql.service
13 |
14 | sudo service mysql start
15 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/install-114.blade.php:
--------------------------------------------------------------------------------
1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
2 |
3 | chmod +x mariadb_repo_setup
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \
6 | --mariadb-server-version="mariadb-11.4"
7 |
8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
9 |
10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y
11 |
12 | sudo systemctl unmask mysql.service
13 |
14 | sudo service mysql start
15 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/link.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "GRANT ALL PRIVILEGES ON {{ $database }}.* TO '{{ $username }}'@'{{ $host }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo mariadb -e "FLUSH PRIVILEGES"; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "Linking to {{ $database }} finished"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/restore.blade.php:
--------------------------------------------------------------------------------
1 | if ! DEBIAN_FRONTEND=noninteractive unzip {{ $file }}.zip; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo DEBIAN_FRONTEND=noninteractive mariadb -u root {{ $database }} < {{ $file }}.sql; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! rm {{ $file }}.sql {{ $file }}.zip; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/uninstall.blade.php:
--------------------------------------------------------------------------------
1 | sudo service mariadb stop
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove mariadb-server mariadb-backup -y
4 |
5 | sudo rm -rf /etc/mysql
6 | sudo rm -rf /var/lib/mysql
7 | sudo rm -rf /var/log/mysql
8 | sudo rm -rf /var/run/mysqld
9 | sudo rm -rf /var/run/mysqld/mysqld.sock
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mariadb/unlink.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mariadb -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '{{ $username }}'@'{{ $host }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Command executed"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/backup.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo DEBIAN_FRONTEND=noninteractive mysqldump -u root {{ $database }} > {{ $file }}.sql; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! DEBIAN_FRONTEND=noninteractive zip {{ $file }}.zip {{ $file }}.sql; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! rm {{ $file }}.sql; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/create-user.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "CREATE USER IF NOT EXISTS '{{ $username }}'@'{{ $host }}' IDENTIFIED BY '{{ $password }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "Command executed"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/create.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "CREATE DATABASE IF NOT EXISTS {{ $name }} CHARACTER SET '{{ $charset }}' COLLATE '{{ $collation }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Command executed"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/delete-user.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "DROP USER IF EXISTS '{{ $username }}'@'{{ $host }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "Command executed"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/delete.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "DROP DATABASE IF EXISTS {{ $name }}"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Command executed"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/get-charsets.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "SHOW COLLATION;"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/get-db-list.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "SELECT
2 | SCHEMA_NAME AS database_name,
3 | DEFAULT_CHARACTER_SET_NAME AS charset,
4 | DEFAULT_COLLATION_NAME AS collation
5 | FROM information_schema.SCHEMATA;";
6 | then
7 | echo 'VITO_SSH_ERROR' && exit 1
8 | fi
9 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/get-users-list.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "SELECT u.User,
2 | u.Host,
3 | (SELECT group_concat(distinct p.TABLE_SCHEMA)
4 | FROM information_schema.SCHEMA_PRIVILEGES p
5 | WHERE p.GRANTEE = concat('\'', u.User, '\'', '@', '\'', u.Host, '\'')) as Privileges
6 | FROM mysql.user u;";
7 | then
8 | echo 'VITO_SSH_ERROR' && exit 1
9 | fi
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/install-57.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mysql-server -y
2 |
3 | sudo systemctl unmask mysql.service
4 |
5 | sudo service mysql enable
6 |
7 | sudo service mysql start
8 |
9 | if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
13 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then
14 | echo 'VITO_SSH_ERROR' && exit 1
15 | fi
16 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/install-80.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get update
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mysql-server -y
4 |
5 | sudo systemctl unmask mysql.service
6 |
7 | sudo service mysql enable
8 |
9 | sudo service mysql start
10 |
11 | if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then
12 | echo 'VITO_SSH_ERROR' && exit 1
13 | fi
14 |
15 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then
16 | echo 'VITO_SSH_ERROR' && exit 1
17 | fi
18 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/link.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "GRANT ALL PRIVILEGES ON {{ $database }}.* TO '{{ $username }}'@'{{ $host }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "Linking to {{ $database }} finished"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/restore.blade.php:
--------------------------------------------------------------------------------
1 | if ! DEBIAN_FRONTEND=noninteractive unzip {{ $file }}.zip; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo DEBIAN_FRONTEND=noninteractive mysql -u root {{ $database }} < {{ $file }}.sql; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! rm {{ $file }}.sql {{ $file }}.zip; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/uninstall.blade.php:
--------------------------------------------------------------------------------
1 | sudo service mysql stop
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove mysql-server -y
4 |
5 | sudo rm -rf /etc/mysql
6 | sudo rm -rf /var/lib/mysql
7 | sudo rm -rf /var/log/mysql
8 | sudo rm -rf /var/run/mysqld
9 | sudo rm -rf /var/run/mysqld/mysqld.sock
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/mysql/unlink.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mysql -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '{{ $username }}'@'{{ $host }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Command executed"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/backup.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres pg_dump -d {{ $database }} -f /var/lib/postgresql/{{ $file }}.sql; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo mv /var/lib/postgresql/{{ $file }}.sql /home/vito/{{ $file }}.sql; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! sudo chown vito:vito /home/vito/{{ $file }}.sql; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
13 | if ! DEBIAN_FRONTEND=noninteractive zip {{ $file }}.zip {{ $file }}.sql; then
14 | echo 'VITO_SSH_ERROR' && exit 1
15 | fi
16 |
17 | if ! rm {{ $file }}.sql; then
18 | echo 'VITO_SSH_ERROR' && exit 1
19 | fi
20 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/create-user.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres psql -c "CREATE ROLE \"{{ $username }}\" WITH LOGIN PASSWORD '{{ $password }}';"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "User {{ $username }} created"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/create.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres psql -c "CREATE DATABASE \"{{ $name }}\" WITH ENCODING '{{ $charset }}'"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Database {{ $name }} created"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/delete-user.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres psql -c "DROP USER \"{{ $username }}\""; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "User {{ $username }} deleted"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/delete.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres psql -c "DROP DATABASE \"{{ $name }}\""; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | echo "Database {{ $name }} deleted"
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/get-charsets.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres psql -c "SELECT collname as collation,
2 | pg_encoding_to_char(collencoding) as charset,
3 | '' as id,
4 | '' as \"default\",
5 | 'Yes' as compiled,
6 | '' as sortlen,
7 | '' as pad_attribute
8 | FROM pg_collation
9 | WHERE not pg_encoding_to_char(collencoding) = ''
10 | ORDER BY charset;";
11 | then
12 | echo 'VITO_SSH_ERROR' && exit 1
13 | fi
14 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/get-db-list.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres psql -c "SELECT
2 | datname AS database_name,
3 | pg_encoding_to_char(encoding) AS charset,
4 | datcollate AS collation
5 | FROM pg_database;";
6 | then
7 | echo 'VITO_SSH_ERROR' && exit 1
8 | fi
9 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/get-users-list.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo -u postgres psql -c "SELECT r.rolname AS username,
2 | '' as host,
3 | STRING_AGG(d.datname, ',') AS databases
4 | FROM pg_roles r
5 | JOIN
6 | pg_database d ON has_database_privilege(r.rolname, d.datname, 'CONNECT')
7 | WHERE r.rolcanlogin
8 | GROUP BY r.rolname
9 | ORDER BY r.rolname;";
10 | then
11 | echo 'VITO_SSH_ERROR' && exit 1
12 | fi
13 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/install-12.blade.php:
--------------------------------------------------------------------------------
1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
2 |
3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
6 |
7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-12 -y
8 |
9 | systemctl status postgresql
10 |
11 | sudo -u postgres psql -c "SELECT version();"
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/install-13.blade.php:
--------------------------------------------------------------------------------
1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
2 |
3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
6 |
7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-13 -y
8 |
9 | systemctl status postgresql
10 |
11 | sudo -u postgres psql -c "SELECT version();"
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/install-14.blade.php:
--------------------------------------------------------------------------------
1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
2 |
3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
6 |
7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-14 -y
8 |
9 | systemctl status postgresql
10 |
11 | sudo -u postgres psql -c "SELECT version();"
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/install-15.blade.php:
--------------------------------------------------------------------------------
1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
2 |
3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
6 |
7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-15 -y
8 |
9 | systemctl status postgresql
10 |
11 | sudo -u postgres psql -c "SELECT version();"
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/install-16.blade.php:
--------------------------------------------------------------------------------
1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
2 |
3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
4 |
5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
6 |
7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-16 -y
8 |
9 | systemctl status postgresql
10 |
11 | sudo -u postgres psql -c "SELECT version();"
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/link.blade.php:
--------------------------------------------------------------------------------
1 | USER_TO_LINK='{{ $username }}'
2 | DB_NAME='{{ $database }}'
3 | DB_VERSION='{{ $version }}'
4 |
5 | if ! sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE \"$DB_NAME\" TO $USER_TO_LINK;"; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | # Check if PostgreSQL version is 15 or greater
10 | if [ "$DB_VERSION" -ge 15 ]; then
11 | if ! sudo -u postgres psql -d "$DB_NAME" -c "GRANT USAGE, CREATE ON SCHEMA public TO $USER_TO_LINK;"; then
12 | echo 'VITO_SSH_ERROR' && exit 1
13 | fi
14 | fi
15 |
16 | echo "Linking to $DB_NAME finished"
17 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/restore.blade.php:
--------------------------------------------------------------------------------
1 | if ! DEBIAN_FRONTEND=noninteractive unzip {{ $file }}.zip; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo -u postgres psql -d {{ $database }} -f {{ $file }}.sql; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! rm {{ $file }}.sql {{ $file }}.zip; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/uninstall.blade.php:
--------------------------------------------------------------------------------
1 | sudo service postgresql stop
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove postgresql-* -y
4 |
5 | sudo rm -rf /etc/postgresql
6 | sudo rm -rf /var/lib/postgresql
7 | sudo rm -rf /var/log/postgresql
8 | sudo rm -rf /var/run/postgresql
9 | sudo rm -rf /var/run/postgresql/postmaster.pid
10 | sudo rm -rf /var/run/postgresql/.s.PGSQL.5432
11 | sudo rm -rf /var/run/postgresql/.s.PGSQL.5432.lock
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/database/postgresql/unlink.blade.php:
--------------------------------------------------------------------------------
1 | USER_TO_REVOKE='{{ $username }}'
2 | DB_VERSION='{{ $version }}'
3 |
4 | DATABASES=$(sudo -u postgres psql -t -c "SELECT datname FROM pg_database WHERE datistemplate = false;")
5 |
6 | for DB in $DATABASES; do
7 | echo "Revoking privileges in database: $DB"
8 | sudo -u postgres psql -d "$DB" -c "REVOKE ALL PRIVILEGES ON DATABASE \"$DB\" FROM $USER_TO_REVOKE;"
9 |
10 | # Check if PostgreSQL version is 15 or greater
11 | if [ "$DB_VERSION" -ge 15 ]; then
12 | sudo -u postgres psql -d "$DB" -c "REVOKE USAGE, CREATE ON SCHEMA public FROM $USER_TO_REVOKE;"
13 | fi
14 | done
15 |
16 | echo "Privileges revoked from $USER_TO_REVOKE"
17 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/firewall/ufw/backup-rules.blade.php:
--------------------------------------------------------------------------------
1 | sudo cp /etc/ufw/before.rules /tmp/ufw.before.backup
2 | sudo cp /etc/ufw/after.rules /tmp/ufw.after.backup
3 | sudo cp /etc/ufw/user.rules /tmp/ufw.user.backup
4 | sudo cp /etc/ufw/before6.rules /tmp/ufw.before6.backup
5 | sudo cp /etc/ufw/after6.rules /tmp/ufw.after6.backup
6 | sudo cp /etc/ufw/user6.rules /tmp/ufw.user6.backup
7 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/firewall/ufw/clear-backups.blade.php:
--------------------------------------------------------------------------------
1 | sudo rm -f /tmp/ufw.before.backup
2 | sudo rm -f /tmp/ufw.after.backup
3 | sudo rm -f /tmp/ufw.user.backup
4 | sudo rm -f /tmp/ufw.before6.backup
5 | sudo rm -f /tmp/ufw.after6.backup
6 | sudo rm -f /tmp/ufw.user6.backup
7 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/firewall/ufw/install-ufw.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo ufw default deny incoming; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo ufw default allow outgoing; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 22; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
13 | if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 80; then
14 | echo 'VITO_SSH_ERROR' && exit 1
15 | fi
16 |
17 | if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 443; then
18 | echo 'VITO_SSH_ERROR' && exit 1
19 | fi
20 |
21 | if ! sudo ufw --force enable; then
22 | echo 'VITO_SSH_ERROR' && exit 1
23 | fi
24 |
25 | if ! sudo ufw reload; then
26 | echo 'VITO_SSH_ERROR' && exit 1
27 | fi
28 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/firewall/ufw/restore-rules.blade.php:
--------------------------------------------------------------------------------
1 | sudo ufw --force disable
2 |
3 | sudo cp /tmp/ufw.before.backup /etc/ufw/before.rules
4 | sudo cp /tmp/ufw.after.backup /etc/ufw/after.rules
5 | sudo cp /tmp/ufw.user.backup /etc/ufw/user.rules
6 | sudo cp /tmp/ufw.before6.backup /etc/ufw/before6.rules
7 | sudo cp /tmp/ufw.after6.backup /etc/ufw/after6.rules
8 | sudo cp /tmp/ufw.user6.backup /etc/ufw/user6.rules
9 |
10 | sudo ufw --force enable
11 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/monitoring/vito-agent/uninstall.blade.php:
--------------------------------------------------------------------------------
1 | sudo service vito-agent stop
2 |
3 | sudo systemctl disable vito-agent
4 |
5 | sudo rm -f /usr/local/bin/vito-agent
6 |
7 | sudo rm -f /etc/systemd/system/vito-agent.service
8 |
9 | sudo rm -rf /etc/vito-agent
10 |
11 | sudo systemctl daemon-reload
12 |
13 | echo "Vito Agent uninstalled successfully"
14 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/nodejs/change-default-nodejs.blade.php:
--------------------------------------------------------------------------------
1 | export NVM_DIR="$HOME/.nvm"
2 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
3 |
4 | if ! nvm alias default {{ $version }}; then
5 | echo 'VITO_SSH_ERROR' && exit 1
6 | fi
7 |
8 | if ! nvm use default; then
9 | echo 'VITO_SSH_ERROR' && exit 1
10 | fi
11 |
12 | echo "Default Node.js is now:"
13 | node -v
14 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/nodejs/uninstall-nodejs.blade.php:
--------------------------------------------------------------------------------
1 | export NVM_DIR="$HOME/.nvm"
2 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
3 |
4 | @if ($default)
5 | if ! nvm unalias default; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 | if ! nvm deactivate; then
9 | echo 'VITO_SSH_ERROR' && exit 1
10 | fi
11 | @endif
12 |
13 | if ! nvm uninstall {{ $version }}; then
14 | echo 'VITO_SSH_ERROR' && exit 1
15 | fi
16 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/php/change-default-php.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo rm /usr/bin/php; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo ln -s /usr/bin/php{{ $version }} /usr/bin/php; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "Default php is: "
10 |
11 | php -v
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/php/fpm-pool.blade.php:
--------------------------------------------------------------------------------
1 | [{{ $user }}]
2 | user = {{ $user }}
3 | group = {{ $user }}
4 |
5 | listen = /run/php/php{{ $version }}-fpm-{{ $user }}.sock
6 | listen.owner = vito
7 | listen.group = vito
8 | listen.mode = 0660
9 |
10 | pm = dynamic
11 | pm.max_children = 5
12 | pm.start_servers = 2
13 | pm.min_spare_servers = 1
14 | pm.max_spare_servers = 3
15 | pm.max_requests = 500
16 |
17 | php_admin_value[open_basedir] = /home/{{ $user }}/:/tmp/
18 | php_admin_value[upload_tmp_dir] = /home/{{ $user }}/tmp
19 | php_admin_value[session.save_path] = /home/{{ $user }}/tmp
20 | php_admin_value[display_errors] = off
21 | php_admin_value[log_errors] = on
22 | php_admin_value[error_log] = /home/{{ $user }}/.logs/php_errors.log
23 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/php/install-composer.blade.php:
--------------------------------------------------------------------------------
1 | cd ~
2 |
3 | curl -sS https://getcomposer.org/installer -o composer-setup.php
4 |
5 | sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
6 |
7 | rm composer-setup.php
8 |
9 | composer
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/php/install-php-extension.blade.php:
--------------------------------------------------------------------------------
1 | sudo apt-get install -y php{{ $version }}-{{ $name }}
2 |
3 | sudo service php{{ $version }}-fpm restart
4 |
5 | php{{ $version }} -m
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/php/remove-fpm-pool.blade.php:
--------------------------------------------------------------------------------
1 | sudo rm -f /etc/php/{{ $version }}/fpm/pool.d/{{ $user }}.conf
2 | sudo service php{{ $version }}-fpm restart
3 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/php/uninstall-php.blade.php:
--------------------------------------------------------------------------------
1 | sudo service php{{ $version }}-fpm stop
2 |
3 | if ! sudo DEBIAN_FRONTEND=noninteractive apt-get remove -y php{{ $version }} php{{ $version }}-fpm php{{ $version }}-mbstring php{{ $version }}-mysql php{{ $version }}-mcrypt php{{ $version }}-gd php{{ $version }}-xml php{{ $version }}-curl php{{ $version }}-gettext php{{ $version }}-zip php{{ $version }}-bcmath php{{ $version }}-soap php{{ $version }}-redis php{{ $version }}-sqlite3; then
4 | echo 'VITO_SSH_ERROR' && exit 1
5 | fi
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/php/update-php-settings.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo sed -i 's,^{{ $variable }} =.*$,{{ $variable }} = {{ $value }},' /etc/php/{{ $version }}/cli/php.ini; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo sed -i 's,^{{ $variable }} =.*$,{{ $variable }} = {{ $value }},' /etc/php/{{ $version }}/fpm/php.ini; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! sudo service php{{ $version }}-fpm restart; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/create-worker.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mkdir -p "$(dirname {{ $logFile }})"; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo touch {{ $logFile }}; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! sudo chown {{ $user }}:{{ $user }} {{ $logFile }}; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
13 | if ! sudo supervisorctl reread; then
14 | echo 'VITO_SSH_ERROR' && exit 1
15 | fi
16 |
17 | if ! sudo supervisorctl update; then
18 | echo 'VITO_SSH_ERROR' && exit 1
19 | fi
20 |
21 | if ! sudo supervisorctl start {{ $id }}:*; then
22 | echo 'VITO_SSH_ERROR' && exit 1
23 | fi
24 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/delete-worker.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo supervisorctl stop {{ $id }}:*; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo rm -rf ~/.logs/workers/{{ $id }}.log; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! sudo rm -rf /etc/supervisor/conf.d/{{ $id }}.conf; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
13 | if ! sudo supervisorctl reread; then
14 | echo 'VITO_SSH_ERROR' && exit 1
15 | fi
16 |
17 | if ! sudo supervisorctl update; then
18 | echo 'VITO_SSH_ERROR' && exit 1
19 | fi
20 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/install-supervisor.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install supervisor -y
2 |
3 | sudo service supervisor enable
4 |
5 | sudo service supervisor start
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/restart-worker.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo supervisorctl restart {{ $id }}:*; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/start-worker.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo supervisorctl start {{ $id }}:*; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/stop-worker.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo supervisorctl stop {{ $id }}:*; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/uninstall-supervisor.blade.php:
--------------------------------------------------------------------------------
1 | sudo service supervisor stop
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove supervisor -y
4 |
5 | sudo rm -rf /etc/supervisor
6 | sudo rm -rf /var/log/supervisor
7 | sudo rm -rf /var/run/supervisor
8 | sudo rm -rf /var/run/supervisor/supervisor.sock
9 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/process-manager/supervisor/worker.blade.php:
--------------------------------------------------------------------------------
1 | [program:{{ $name }}]
2 | process_name=%(program_name)s_%(process_num)02d
3 | command={{ $command }}
4 | autostart={{ $autoStart }}
5 | autorestart={{ $autoRestart }}
6 | user={{ $user }}
7 | numprocs={{ $numprocs }}
8 | redirect_stderr=true
9 | stdout_logfile={{ $logFile }}
10 | stopwaitsecs=3600
11 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/redis/install.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install redis-server -y
2 |
3 | sudo sed -i 's/bind 127.0.0.1 ::1/bind 0.0.0.0/g' /etc/redis/redis.conf
4 |
5 | sudo service redis enable
6 |
7 | sudo service redis start
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/redis/uninstall.blade.php:
--------------------------------------------------------------------------------
1 | sudo service redis stop
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove redis-server -y
4 |
5 | sudo rm -rf /etc/redis
6 | sudo rm -rf /var/lib/redis
7 | sudo rm -rf /var/log/redis
8 | sudo rm -rf /var/run/redis
9 | sudo rm -rf /var/run/redis/redis-server.pid
10 | sudo rm -rf /var/run/redis/redis-server.sock
11 | sudo rm -rf /var/run/redis/redis-server.sock
12 |
13 | sudo DEBIAN_FRONTEND=noninteractive sudo apt-get autoremove -y
14 |
15 | sudo DEBIAN_FRONTEND=noninteractive sudo apt-get autoclean -y
16 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/caddy-systemd.blade.php:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Caddy web server
3 | Documentation=https://caddyserver.com/docs/
4 | After=network.target network-online.target
5 | Requires=network-online.target
6 |
7 | [Service]
8 | Type=notify
9 | ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
10 | ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
11 | TimeoutStopSec=5s
12 | LimitNOFILE=1048576
13 | LimitNPROC=512
14 | PrivateTmp=true
15 | ProtectSystem=full
16 | AmbientCapabilities=CAP_NET_BIND_SERVICE
17 |
18 | [Install]
19 | WantedBy=multi-user.target
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/change-php-version.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo sed -i 's/php{{ $oldVersion }}/php{{ $newVersion }}/g' /etc/caddy/sites-available/{{ $domain }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo service caddy restart; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "PHP Version Changed to {{ $newVersion }}"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/create-custom-ssl.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mkdir -p {{ $path }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! echo "{{ $certificate }}" | sudo tee {{ $certificatePath }}; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! echo "{{ $pk }}" | sudo tee {{ $pkPath }}; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
13 | echo "Successfully received certificate."
14 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/create-path.blade.php:
--------------------------------------------------------------------------------
1 | export DEBIAN_FRONTEND=noninteractive
2 |
3 | rm -rf {{ $path }}
4 |
5 | mkdir {{ $path }}
6 |
7 | chmod -R 755 {{ $path }}
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/create-vhost.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo ln -s /etc/caddy/sites-available/{{ $domain }} /etc/caddy/sites-enabled/; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo service caddy restart; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/delete-site.blade.php:
--------------------------------------------------------------------------------
1 | rm -rf {{ $path }}
2 |
3 | sudo rm /etc/caddy/sites-available/{{ $domain }}
4 |
5 | sudo rm /etc/caddy/sites-enabled/{{ $domain }}
6 |
7 | echo "Site deleted"
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/get-vhost.blade.php:
--------------------------------------------------------------------------------
1 | cat /etc/caddy/sites-available/{{ $domain }}
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/redirects.blade.php:
--------------------------------------------------------------------------------
1 | @foreach($site->activeRedirects as $redirect)
2 | redir {{ $redirect->from }} {{ $redirect->to }} {{ $redirect->mode }}
3 | @endforeach
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/caddy/uninstall-caddy.blade.php:
--------------------------------------------------------------------------------
1 | sudo service caddy stop
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive sudo apt remove caddy -y
4 |
5 | sudo rm -rf /etc/caddy
6 | sudo rm -rf /var/log/caddy
7 | sudo rm -rf /var/lib/caddy
8 | sudo rm -rf /var/cache/caddy
9 | sudo rm -rf /usr/share/caddy
10 | sudo rm -rf /etc/systemd/system/caddy.service
11 |
12 | sudo systemctl daemon-reload
13 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/change-php-version.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo sed -i 's/php{{ $oldVersion }}/php{{ $newVersion }}/g' /etc/nginx/sites-available/{{ $domain }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo service nginx restart; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | echo "PHP Version Changed to {{ $newVersion }}"
10 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/create-custom-ssl.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo mkdir -p {{ $path }}; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! echo "{{ $certificate }}" | sudo tee {{ $certificatePath }}; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
9 | if ! echo "{{ $pk }}" | sudo tee {{ $pkPath }}; then
10 | echo 'VITO_SSH_ERROR' && exit 1
11 | fi
12 |
13 | echo "Successfully received certificate."
14 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/create-letsencrypt-ssl.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo certbot certonly --force-renewal --nginx --noninteractive --agree-tos --cert-name {{ $name }} -m {{ $email }} {{ $domains }} --verbose; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/create-path.blade.php:
--------------------------------------------------------------------------------
1 | export DEBIAN_FRONTEND=noninteractive
2 |
3 | rm -rf {{ $path }}
4 |
5 | mkdir {{ $path }}
6 |
7 | chmod -R 755 {{ $path }}
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/create-vhost.blade.php:
--------------------------------------------------------------------------------
1 | if ! sudo ln -s /etc/nginx/sites-available/{{ $domain }} /etc/nginx/sites-enabled/; then
2 | echo 'VITO_SSH_ERROR' && exit 1
3 | fi
4 |
5 | if ! sudo service nginx restart; then
6 | echo 'VITO_SSH_ERROR' && exit 1
7 | fi
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/delete-site.blade.php:
--------------------------------------------------------------------------------
1 | rm -rf {{ $path }}
2 |
3 | sudo rm /etc/nginx/sites-available/{{ $domain }}
4 |
5 | sudo rm /etc/nginx/sites-enabled/{{ $domain }}
6 |
7 | echo "Site deleted"
8 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/get-vhost.blade.php:
--------------------------------------------------------------------------------
1 | cat /etc/nginx/sites-available/{{ $domain }}
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/install-nginx.blade.php:
--------------------------------------------------------------------------------
1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install nginx -y
2 |
3 | # install certbot
4 | sudo DEBIAN_FRONTEND=noninteractive apt-get install certbot python3-certbot-nginx -y
5 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/redirects.blade.php:
--------------------------------------------------------------------------------
1 | @foreach($site->activeRedirects as $redirect)
2 | location = {{ $redirect->from }} {
3 | return {{ $redirect->mode }} {{ $redirect->to }};
4 | }
5 | @endforeach
6 |
--------------------------------------------------------------------------------
/resources/views/ssh/services/webserver/nginx/uninstall-nginx.blade.php:
--------------------------------------------------------------------------------
1 | sudo service nginx stop
2 |
3 | sudo DEBIAN_FRONTEND=noninteractive apt-get purge nginx nginx-common nginx-full -y
4 |
5 | sudo rm -rf /etc/nginx
6 | sudo rm -rf /var/log/nginx
7 | sudo rm -rf /var/lib/nginx
8 | sudo rm -rf /var/cache/nginx
9 | sudo rm -rf /usr/share/nginx
10 | sudo rm -rf /etc/systemd/system/nginx.service
11 |
12 | sudo systemctl daemon-reload
13 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/dropbox/delete-file.blade.php:
--------------------------------------------------------------------------------
1 | curl --location --request POST 'https://api.dropboxapi.com/2/files/delete_v2' \
2 | --header 'Authorization: Bearer {{ $token }}' \
3 | --header 'Content-Type: application/json' \
4 | --data-raw '{
5 | "path": "{{ $src }}"
6 | }'
7 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/dropbox/download.blade.php:
--------------------------------------------------------------------------------
1 | curl -o {{ $dest }} --location --request POST 'https://content.dropboxapi.com/2/files/download' \
2 | --header 'Accept: application/json' \
3 | --header 'Dropbox-API-Arg: {"path":"{{ $src }}"}' \
4 | --header 'Authorization: Bearer {{ $token }}'
5 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/dropbox/upload.blade.php:
--------------------------------------------------------------------------------
1 | curl -sb --location --request POST 'https://content.dropboxapi.com/2/files/upload' \
2 | --header 'Accept: application/json' \
3 | --header 'Dropbox-API-Arg: {"path":"{{ $dest }}"}' \
4 | --header 'Content-Type: text/plain; charset=dropbox-cors-hack' \
5 | --header 'Authorization: Bearer {{ $token }}' \
6 | --data-binary '@{{ $src }}'
7 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/ftp/delete-file.blade.php:
--------------------------------------------------------------------------------
1 | curl {{ $passive }} -u "{{ $username }}:{{ $password }}" ftp{{ $ssl }}://{{ $host }}:{{ $port }}/{{ $src }} -Q "DELE /{{ $src }}"
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/ftp/download.blade.php:
--------------------------------------------------------------------------------
1 | curl {{ $passive }} -u "{{ $username }}:{{ $password }}" ftp{{ $ssl }}://{{ $host }}:{{ $port }}/{{ $src }} -o "{{ $dest }}"
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/ftp/upload.blade.php:
--------------------------------------------------------------------------------
1 | curl {{ $passive }} -T "{{ $src }}" -u "{{ $username }}:{{ $password }}" ftp{{ $ssl }}://{{ $host }}:{{ $port }}/{{ $dest }}
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/local/download.blade.php:
--------------------------------------------------------------------------------
1 | cp {{ $src }} {{ $dest }}
2 |
--------------------------------------------------------------------------------
/resources/views/ssh/storage/local/upload.blade.php:
--------------------------------------------------------------------------------
1 | mkdir -p {{ $destDir }}
2 | cp {{ $src }} {{ $destFile }}
3 |
--------------------------------------------------------------------------------
/scripts/post-update.sh:
--------------------------------------------------------------------------------
1 | # post-update script is here to cover extra commands in case of an update requires it.
2 | echo "Running post-update script..."
3 |
--------------------------------------------------------------------------------
/scripts/update.sh:
--------------------------------------------------------------------------------
1 | echo "Updating Vito..."
2 |
3 | cd /home/vito/vito
4 |
5 | echo "Pulling changes..."
6 | git fetch --all
7 |
8 | echo "Checking out the latest tag..."
9 | NEW_RELEASE=$(git tag -l "2.*" --sort=-v:refname | head -n 1)
10 | git checkout "$NEW_RELEASE"
11 |
12 | git pull origin "$NEW_RELEASE"
13 |
14 | echo "Installing composer dependencies..."
15 | composer install --no-dev
16 |
17 | echo "Running migrations..."
18 | php artisan migrate --force
19 |
20 | echo "Optimizing..."
21 | php artisan optimize:clear
22 | php artisan optimize
23 |
24 | echo "Restarting workers..."
25 | sudo supervisorctl restart worker:*
26 |
27 | bash scripts/post-update.sh
28 |
29 | echo "Vito updated successfully to $NEW_RELEASE! 🎉"
30 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | compiled.php
2 | config.php
3 | down
4 | events.scanned.php
5 | maintenance.php
6 | routes.php
7 | routes.scanned.php
8 | schedule-*
9 | services.json
10 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/framework/cache/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
18 |
19 | return $app;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/Unit/NotificationChannels/TestNotification.php:
--------------------------------------------------------------------------------
1 |