Merge pull request #159 from amnezia-vpn/bugfix/linux-uninstall

bugfix/linux-uninstall
This commit is contained in:
pokamest 2023-01-30 20:37:46 +00:00 committed by GitHub
commit 638c3492d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

3
.gitignore vendored
View file

@ -127,3 +127,6 @@ captures/
# Android Profiling
*.hprof
client/3rd/ShadowSocks/ss_ios.xcconfig
# UML generated pics
out/

View file

@ -26,7 +26,7 @@ function appInstalled()
} else if (runningOnMacOS()){
appInstalledUninstallerPath = "/Applications/" + appName() + ".app/maintenancetool.app/Contents/MacOS/maintenancetool";
} else if (runningOnLinux()){
allInstalledUninstallerPath = "/opt/" + appName();
appInstalledUninstallerPath = "/opt/" + appName() + "/maintenancetool";
}
return installer.fileExists(appInstalledUninstallerPath) || installer.fileExists(appInstalledUninstallerPath_x86);
@ -49,7 +49,7 @@ function runningOnMacOS()
function runningOnLinux()
{
return (installer.value("os") === "linux");
return ((installer.value("os") === "linux") || (installer.value("os") === "x11"));
}
function sleep(miliseconds) {

View file

@ -93,7 +93,7 @@ Component.prototype.createOperations = function()
} else if (runningOnMacOS()) {
component.addElevatedOperation("Execute", "@TargetDir@/post_install.sh", "UNDOEXECUTE", "@TargetDir@/post_uninstall.sh");
} else if (runningOnLinux()) {
component.addElevatedOperation("Execute", "bash", "@TargetDir@/post_install.sh", "UNDOEXECUTE", "bash", "@TargetDir@/post_uninstall.sh");
component.addElevatedOperation("Execute", "bash", "@TargetDir@/post_install.sh", "UNDOEXECUTE", "bash", "@TargetDir@/post_uninstall.sh");
}
}