mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SEARCH-598 and SEARCH-611 (Deleting data folder on Electron Crash) (#307)
- Deleting the data folder on crash and unexpected shutdown - Created script for clearing the index data on start up - Working in dev env - Added path to package - Windows path file change - Working on production build - Completed implementation - Few changes to callback - Few changes to callback - Updated package - Fixed windows bug - Fixed windows bug - Fixed windows bug - Added exe for task - Added exe for task - Fixed exe file - Code refactoring - Updated api file - Added uuid for the task name - Updated exe for the uuid - Updated API file - AIP version - Fixes all the scenarios for mac - Updated the boot file to clear data file on login - Fixed data folder deleting on application is open - Windows launch agent - Working on all the scenario - Added a launch script and starting the register - Updated search-win-task.exe file - Updating the aip file - Updating the aip file - Removed randomString lib - Requested changes (PR) - Included the library from new repo electron-uitls - Updated AIP file - Updated AIP - Bumped up electron-utils version - Added missing quotes - Bumped up electron-utils version - Added missing quotes - Bumped utils version - Bumped utils version - Update AIP
This commit is contained in:
committed by
Vishwas Shashidhar
parent
e0b831bcde
commit
c3b82a0869
44
library/search-launch-agent.sh
Normal file
44
library/search-launch-agent.sh
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
pid=$2
|
||||
launchDir=~/Library/LaunchAgents/
|
||||
|
||||
if $1; then
|
||||
if [ ! -d "$launchDir" ]; then
|
||||
mkdir "$launchDir"
|
||||
fi
|
||||
launchctl unload ~/Library/LaunchAgents/com.symphony-search.data.plist
|
||||
cat > ~/Library/LaunchAgents/com.symphony-search.data.plist << EOT
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.symphony-search.data.agent</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/sh</string>
|
||||
<string>scriptPath</string>
|
||||
<string>false</string>
|
||||
<string>SymphonyPID</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<false/>
|
||||
<key>StartInterval</key>
|
||||
<integer>60</integer>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/dev/null</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/dev/null</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOT
|
||||
launchctl load ~/Library/LaunchAgents/com.symphony-search.data.plist
|
||||
elif ps -p $pid > /dev/null
|
||||
then
|
||||
echo true
|
||||
else
|
||||
echo false
|
||||
rm -rf dataPath
|
||||
launchctl unload ~/Library/LaunchAgents/com.symphony-search.data.plist
|
||||
rm -rf ~/Library/LaunchAgents/com.symphony-search.data.plist
|
||||
fi
|
||||
Reference in New Issue
Block a user