mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
c3b82a0869
- 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
44 lines
1.2 KiB
Bash
44 lines
1.2 KiB
Bash
#!/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 |