Move service enabling to setup.php
This commit is contained in:
@ -99,13 +99,6 @@ quotaon /home
|
|||||||
|
|
||||||
In some cases, you might get an error, that quota is not supported. This is usually the case in virtual environments. Make sure you have the full kernel installed, not one with a `-virtual` package. They usually are `linux-image-amd64`, `linux-image-arm64` or `linux-image-generic`, depending on your distribution. Also make sure, you are running a real virtual machine (e.g. KVM). Some providers sell containerized VPSes (e.g. OpenVZ), which means you don't run your own kernel...
|
In some cases, you might get an error, that quota is not supported. This is usually the case in virtual environments. Make sure you have the full kernel installed, not one with a `-virtual` package. They usually are `linux-image-amd64`, `linux-image-arm64` or `linux-image-generic`, depending on your distribution. Also make sure, you are running a real virtual machine (e.g. KVM). Some providers sell containerized VPSes (e.g. OpenVZ), which means you don't run your own kernel...
|
||||||
|
|
||||||
Enable the PHP-FPM default instances and nginx:
|
|
||||||
```
|
|
||||||
systemctl enable php7.4-fpm@default
|
|
||||||
systemctl enable php8.0-fpm@default
|
|
||||||
systemctl enable nginx
|
|
||||||
```
|
|
||||||
|
|
||||||
Install sodium_compat for v3 hidden_service support
|
Install sodium_compat for v3 hidden_service support
|
||||||
```
|
```
|
||||||
cd /var/www && composer install
|
cd /var/www && composer install
|
||||||
|
@ -292,7 +292,8 @@ env[HOME]=/
|
|||||||
mkdir("/etc/php/$version/fpm/pool.d/", 0755, true);
|
mkdir("/etc/php/$version/fpm/pool.d/", 0755, true);
|
||||||
}
|
}
|
||||||
file_put_contents("/etc/php/$version/fpm/pool.d/www.conf", $pool_config);
|
file_put_contents("/etc/php/$version/fpm/pool.d/www.conf", $pool_config);
|
||||||
exec('systemctl reload '.escapeshellarg("php$version-fpm@default"));
|
exec("systemctl enable ".escapeshellarg("php$version-fpm@default"));
|
||||||
|
exec("systemctl restart ".escapeshellarg("php$version-fpm@default"));
|
||||||
}
|
}
|
||||||
echo "Updating chroots, this might take a while…\n";
|
echo "Updating chroots, this might take a while…\n";
|
||||||
exec('/var/www/setup_chroot.sh /var/www');
|
exec('/var/www/setup_chroot.sh /var/www');
|
||||||
@ -318,7 +319,8 @@ file_put_contents('/etc/nginx/streams-enabled/default', "server {
|
|||||||
listen unix:/var/www/var/run/mysqld/mysqld.sock;
|
listen unix:/var/www/var/run/mysqld/mysqld.sock;
|
||||||
proxy_pass unix:/var/run/mysqld/mysqld.sock;
|
proxy_pass unix:/var/run/mysqld/mysqld.sock;
|
||||||
}");
|
}");
|
||||||
exec('systemctl reload nginx');
|
exec('systemctl enable nginx');
|
||||||
|
exec('systemctl restart nginx');
|
||||||
// add new php/tor instances if not yet existing
|
// add new php/tor instances if not yet existing
|
||||||
$check=$db->prepare('SELECT null FROM service_instances WHERE id = ?;');
|
$check=$db->prepare('SELECT null FROM service_instances WHERE id = ?;');
|
||||||
$stmt=$db->prepare('INSERT INTO service_instances (id) VALUES (?);');
|
$stmt=$db->prepare('INSERT INTO service_instances (id) VALUES (?);');
|
||||||
|
Reference in New Issue
Block a user