mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
zoph: Fix failing PHP configuration requirements
I tested both fresh install and updating an existing installation.
When updating an existing instance, the app had to be manually enabled,
so I added:
```
elif old_version < 2:
self.enable()
```
Fixes: #2345
Signed-off-by: Benedek Nagy <contact@nbenedek.me>
[sunil: Change the config name to zoph-freedombox.php]
[sunil: Enable the config during update only if app is already enabled]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
acc498cb90
commit
9c5491de7e
@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, frontpage, menu
|
||||
from plinth.config import DropinConfigs
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
@ -42,7 +43,7 @@ class ZophApp(app_module.App):
|
||||
|
||||
app_id = 'zoph'
|
||||
|
||||
_version = 1
|
||||
_version = 2
|
||||
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
@ -76,10 +77,18 @@ class ZophApp(app_module.App):
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
dropin_configs = DropinConfigs('dropin-configs-zoph', [
|
||||
'/etc/apache2/conf-available/zoph-freedombox.conf',
|
||||
])
|
||||
self.add(dropin_configs)
|
||||
|
||||
webserver = Webserver('webserver-zoph', 'zoph',
|
||||
urls=['https://{host}/zoph/'])
|
||||
self.add(webserver)
|
||||
|
||||
webserver = Webserver('webserver-zoph-freedombox', 'zoph-freedombox')
|
||||
self.add(webserver)
|
||||
|
||||
backup_restore = ZophBackupRestore('backup-restore-zoph',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
@ -91,6 +100,9 @@ class ZophApp(app_module.App):
|
||||
privileged.setup()
|
||||
if not old_version:
|
||||
self.enable()
|
||||
elif old_version < 2:
|
||||
if self.get_component('webserver-zoph').is_enabled():
|
||||
self.enable()
|
||||
|
||||
|
||||
class ZophBackupRestore(BackupRestore):
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
<Location "/zoph">
|
||||
<IfModule proxy_fcgi_module>
|
||||
ProxyFCGISetEnvIf true PHP_VALUE "max_execution_time = 100 \n upload_max_filesize = 16M \n post_max_size = 16M"
|
||||
</IfModule>
|
||||
</Location>
|
||||
Loading…
x
Reference in New Issue
Block a user