Skip to content

Commit 9821788

Browse files
author
Kristan Kenney
authored
Merge pull request hestiacp#1727 from jaapmarcus/feature/drupal-quick-install
Add Drupal as Quick install option
2 parents dfb0335 + 4b40d54 commit 9821788

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ All notable changes to this project will be documented in this file.
4545
- Disabled changing backup folder via Web UI because it used symbolic link instead of mount causing issues with restore mail / user files.
4646
- Fixed XSS vulnerability in `v-add-sys-ip` and user history log (thanks **@numanturle**).
4747
- Fixed remote code execution vulnerability which could occur when deleting SSH keys (thanks **@numanturle**).
48+
- Fixed vulnerability in v-update-sys-hestia (thanks **@numanturle**)
4849
- Improve how Quick install of web apps are handled and allow users added apps to be maintained in list view.
50+
- Add Drupal quick installer
51+
- Add Nextcloud quick installer
4952

5053
## [1.3.5] - Service Release
5154
### Features

install/upgrade/versions/1.4.0.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,14 @@ rm -rf $HESTIA/data/templates/web/nginx/php-fpm/drupal7.*tpl
150150
rm -rf $HESTIA/data/templates/web/nginx/php-fpm/drupal8.*tpl
151151
rm -rf $HESTIA/data/templates/web/nginx/php-fpm/codeigniter2.*tpl
152152
rm -rf $HESTIA/data/templates/web/nginx/php-fpm/codeigniter3.*tpl
153+
154+
# Clean up old Hestia controled webapps
155+
if [ -d "$HESTIA/web/images/webapps/" ]; then
156+
echo "[ * ] Clean up old web apps code..."
157+
rm -rf $HESTIA/web/images/webapps/
158+
rm -rf $HESTIA/web/src/app/WebApp/Installers/LaravelSetup.php
159+
rm -rf $HESTIA/web/src/app/WebApp/Installers/OpencartSetup.php
160+
rm -rf $HESTIA/web/src/app/WebApp/Installers/PrestashopSetup.php
161+
rm -rf $HESTIA/web/src/app/WebApp/Installers/SymfonySetup.php
162+
rm -rf $HESTIA/web/src/app/WebApp/Installers/WordpressSetup.php
163+
fi

web/src/app/WebApp/Installers/Drupal/DrupalSetup.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,38 @@ class DrupalSetup extends BaseSetup {
1111
protected $appInfo = [
1212
'name' => 'Drupal',
1313
'group' => 'cms',
14-
'enabled' => false,
14+
'enabled' => 'yes',
1515
'version' => 'latest',
1616
'thumbnail' => 'drupal-thumb.png'
1717
];
1818

1919
protected $config = [
2020
'form' => [
21+
'username' => ['type'=>'text', 'value'=>'admin'],
22+
'password' => 'password',
23+
'email' => 'text'
2124
],
2225
'database' => true,
2326
'resources' => [
24-
27+
'composer' => [ 'src' => 'drupal/recommended-project', 'dst' => '/' ],
2528
],
2629
];
2730

2831
public function install(array $options=null) : bool
2932
{
30-
exit( "Installer missing" );
33+
parent::install($options);
34+
$this->appcontext->runComposer(["require", "-d " . $this->getDocRoot(), "drush/drush:^10"], $result);
35+
36+
$this -> appcontext -> runUser('v-run-cli-cmd', [
37+
'php',
38+
$this -> getDocRoot('/vendor/drush/drush/drush'),
39+
'site-install',
40+
'standard',
41+
'--db-url=mysql://'.$this->appcontext->user() . '_' . $options['database_user'].':' . $options['database_password'].'@localhost:3306/'.$this->appcontext->user() . '_' . $options['database_name'].'',
42+
'--account-name='.$options['username'].' --account-pass='.$options['password'],
43+
'--site-name=Drupal',
44+
'--site-mail='.$options['email']
45+
], $status);
46+
return ($status->code === 0);
3147
}
3248
}

0 commit comments

Comments
 (0)