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

Basic changes #911

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion build/installer/MEGAcmd.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
/Applications/MEGAcmd.app/Contents/MacOS/mega-cmd &
sleep 2
sleep 1
osascript -e 'tell app "Terminal" to do script "/Applications/MEGAcmd.app/Contents/MacOS/MEGAcmdShell;exit" activate'
2 changes: 1 addition & 1 deletion build/megacmd/debian.compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9
8
13 changes: 12 additions & 1 deletion build/megacmd/debian.prerm
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
#!/bin/bash

[ "$1" == "upgrade" ] && killall -s SIGUSR1 mega-cmd-server 2> /dev/null || true
# Check if the first argument is "upgrade" and if mega-cmd-server is running
if [ "$1" == "upgrade" ]; then
# Attempt to gracefully upgrade mega-cmd-server by sending SIGUSR1
if pgrep mega-cmd-server >/dev/null; then
killall -s SIGUSR1 mega-cmd-server 2> /dev/null
echo "Sent SIGUSR1 to mega-cmd-server for upgrade."
else
echo "mega-cmd-server is not running."
fi
else
echo "Usage: $0 upgrade"
fi