Remove existing CKAN installation if present

Add command to remove existing CKAN installation
This commit is contained in:
Abdur Rahman 2025-09-04 06:50:48 +00:00 committed by GitHub
parent bc0910b4cd
commit dc1bf9bcfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -221,6 +221,7 @@ fn main() -> Result<()> {
config.ckan_version
);
cmd!(sh, "sudo apt install python3-dev libpq-dev python3-pip python3-venv git-core redis-server -y").run()?;
cmd!(sh, "sudo rm -rf /usr/lib/ckan").run().ok(); // Remove whatever exists (ok() to ignore if nothing exists)
cmd!(sh, "sudo mkdir -p /usr/lib/ckan/default").run()?;
cmd!(sh, "sudo chown {username} /usr/lib/ckan/default").run()?;
let venv_path = PathBuf::from_str("/usr/lib/ckan/default")?;