Remove existing CKAN directory if it exists

Add command to remove existing CKAN directory before creating a new one.
This commit is contained in:
Abdur Rahman 2025-09-04 06:54:24 +00:00 committed by GitHub
parent dc1bf9bcfa
commit aaf4655690
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -234,6 +234,7 @@ fn main() -> Result<()> {
)
.as_str(),
)?;
cmd!(sh, "sudo rm -rf /etc/ckan").run().ok(); // Remove whatever exists
cmd!(sh, "sudo mkdir -p /etc/ckan/default").run()?;
cmd!(sh, "sudo chown -R {username} /etc/ckan/").run()?;
cmd!(