6 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
f9c624562a
wordpress: Fix minor issue in restoring database
- Overlooked in !2454.

Tests:

- Take a backup of wordpress app and disable it. Restore from the backup
succeeds after that.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-03-11 15:24:21 -07:00
Sunil Mohan Adapa
f0ff0c181b
wordpress: Drop database user when app is uninstalled
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-11 16:50:45 -04:00
Sunil Mohan Adapa
d615ff107e
wordpress: Fix backup, restore and uninstall when db is not running
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-11 16:50:42 -04:00
Sunil Mohan Adapa
717e8cd7f5
wordpress: Don't fail setup if mysql installed but not running
Tests:

- Install zoph and disable it. This will install mysql and disable it. Then
install wordpress. Installation should succeed.

- Disable wordpress and re-run setup. Setup should succeed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-11 16:50:12 -04:00
nbenedek
30b0019865
wordpress: Completely uninstall app
* When app is uninstalled, remove config files and drop the database
* Declare PUBLIC_ACCESS_FILE with pathlib.Path
* Add public access file to the backup manifest

Tests:
1. Install and setup wordpress
2. Reinstall the app and confirm that the initial setup page is shown to the user
3. Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, minor refactoring]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-14 18:58:59 +05:30
Sunil Mohan Adapa
d68a84d245
wordpress: Use privileged decorator for actions
Tests:

- Functional tests work (when libpam-tmpdir is removed)
  - Backup and restore of database works
- Initial setup work
  - Configuration file is created
  - Database is created
  - Website is accessible
- Enabling/disabling public access works
  - Configuration file created/deleted
  - App page show proper status

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:53:39 -04:00