Skip to content

Commit

Permalink
fix: prevent death at killall
Browse files Browse the repository at this point in the history
  • Loading branch information
mykeels committed Jul 15, 2019
1 parent a444877 commit 20b6f6f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions slack-day
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,22 @@ then
$EXE_FILE </dev/null &>/dev/null & # start slack process in detached mode
elif [ "$(uname)" == "Linux" ] # Linux OS
then
killall "slack" # kill all slack processes
if [ $(ps aux | grep -i slack | wc -l) -gt 1 ]
then
killall "slack" # kill all slack processes
fi
slack </dev/null &>/dev/null & # start slack process in detached mode
elif [ "$(uname)" == "Darwin" ] # Mac OS
then
if [ $IS_VERSION_4 ]
then
sudo asar pack ./files/app.asar.unpacked $ASAR_FILE
fi
killall "Slack" # kill all slack processes

if [ $(ps aux | grep -i Slack | wc -l) -gt 1 ]
then
killall "Slack" # kill all slack processes
fi
/Applications/Slack.app/Contents/MacOS/Slack </dev/null &>/dev/null & # start slack process in detached mode
fi
fi
11 changes: 9 additions & 2 deletions slack-theme
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,22 @@ then
$EXE_FILE </dev/null &>/dev/null & # start slack process in detached mode
elif [ "$(uname)" == "Linux" ] # Linux OS
then
killall "slack" # kill all slack processes
if [ $(ps aux | grep -i slack | wc -l) -gt 1 ]
then
killall "slack" # kill all slack processes
fi
slack </dev/null &>/dev/null & # start slack process in detached mode
elif [ "$(uname)" == "Darwin" ] # Mac OS
then
if [ $IS_VERSION_4 ]
then
sudo $ASAR pack "$DIR/files/app.asar.unpacked" $ASAR_FILE
fi
killall "Slack" # kill all slack processes

if [ $(ps aux | grep -i Slack | wc -l) -gt 1 ]
then
killall "Slack" # kill all slack processes
fi
/Applications/Slack.app/Contents/MacOS/Slack </dev/null &>/dev/null & # start slack process in detached mode
fi
else
Expand Down

0 comments on commit 20b6f6f

Please sign in to comment.