Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Stop lima process in postinstall and uninstall #438

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions installer-builder/darwin/Resources/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ while true; do
done

echo "Application uninstalling process started"
sudo pkill '^socket_vmnet'
sudo pkill '^qemu-system-'
sudo pkill '^limactl'

if [ "$$(readlink "/usr/local/bin/finch")" = "/Applications/Finch/bin/finch" ]; then sudo rm /usr/local/bin/finch; fi

echo "[1/3] [DONE] Successfully deleted shortcut links"
Expand All @@ -37,8 +41,5 @@ else
echo "[3/3] [ERROR] Could not delete application" >&2
fi

sudo pkill '^socket_vmnet'
sudo pkill '^qemu-system-'

echo "Application uninstall process finished"
exit 0
6 changes: 4 additions & 2 deletions installer-builder/darwin/scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

echo "Post installation process started..."

sudo pkill '^socket_vmnet'
sudo pkill '^qemu-system-'
sudo pkill '^limactl'

#change permissions in home directory
echo "Change permissions for product home directory."
cd /Applications/Finch
Expand All @@ -11,8 +15,6 @@ chmod -R 755 /Applications/Finch/dependencies/lima-socket_vmnet/opt/finch

#clean old artifacts
sudo ln -sf /Applications/Finch/bin/finch /usr/local/bin/finch
sudo pkill '^socket_vmnet'
sudo pkill '^qemu-system-'
sudo rm -rf "/Applications/Finch/lima/data/finch/"
sudo rm -rf "/Applications/Finch/lima/data/_config/override.yaml"
sudo rm -rf "/Applications/Finch/lima/data/_config/user"
Expand Down