File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
build/resources/deb/DEBIAN Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ set -e
1212case " $1 " in
1313 install|upgrade)
1414 # Check if SourceGit is running and stop it
15- if pidof -q sourcegit || pgrep -f sourcegit > /dev/null; then
16- echo " SourceGit is running, stopping it ..."
17- killall sourcegit 2> /dev/null || pkill -f sourcegit 2> /dev/null || true
18- # Wait for SourceGit to exit
15+ if pgrep -f ' /opt/ sourcegit/sourcegit ' > /dev/null; then
16+ echo " Stopping running SourceGit instance ..."
17+ pkill -f ' /opt/sourcegit/sourcegit ' || true
18+ # Give the process a moment to terminate
1919 sleep 1
2020 fi
2121 ;;
Original file line number Diff line number Diff line change @@ -15,11 +15,10 @@ set -e
1515
1616case " $1 " in
1717 remove|upgrade|deconfigure)
18- # Check if SourceGit is running and stop it
19- if pidof -q sourcegit || pgrep -f sourcegit > /dev/null; then
20- echo " SourceGit is running, stopping it before removal..."
21- killall sourcegit 2> /dev/null || pkill -f sourcegit 2> /dev/null || true
22- # Wait for SourceGit to exit
18+ if pgrep -f ' /opt/sourcegit/sourcegit' > /dev/null; then
19+ echo " Stopping running SourceGit instance..."
20+ pkill -f ' /opt/sourcegit/sourcegit' || true
21+ # Give the process a moment to terminate
2322 sleep 1
2423 fi
2524 ;;
You can’t perform that action at this time.
0 commit comments