File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed
build/resources/deb/DEBIAN Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ EndProject
6060Project ("{2150E333-8FDC-42A3-9474-1A3956D46DE8}" ) = "DEBIAN" , "DEBIAN" , "{F101849D-BDB7-40D4-A516-751150C3CCFC}"
6161 Project Section (SolutionItems ) = preProject
6262 build \resources \deb \DEBIAN \control = build \resources \deb \DEBIAN \control
63+ build \resources \deb \DEBIAN \preinst = build \resources \deb \DEBIAN \preinst
64+ build \resources \deb \DEBIAN \prerm = build \resources \deb \DEBIAN \prerm
6365 EndProject Section
6466EndProject
6567Project ("{2150E333-8FDC-42A3-9474-1A3956D46DE8}" ) = "rpm" , "rpm" , "{9BA0B044-0CC9-46F8-B551-204F149BF45D}"
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ # summary of how this script can be called:
6+ # * <new-preinst> `install'
7+ # * <new-preinst> `install' <old-version>
8+ # * <new-preinst> `upgrade' <old-version>
9+ # * <old-preinst> `abort-upgrade' <new-version>
10+ # for details, see http://www.debian.org/doc/debian-policy/
11+
12+ case " $1 " in
13+ install|upgrade)
14+ # 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
19+ sleep 1
20+ fi
21+ ;;
22+
23+ abort-upgrade)
24+ ;;
25+
26+ * )
27+ echo " preinst called with unknown argument \` $1 '" >&2
28+ exit 1
29+ ;;
30+ esac
31+
32+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ # summary of how this script can be called:
6+ # * <prerm> `remove'
7+ # * <old-prerm> `upgrade' <new-version>
8+ # * <new-prerm> `failed-upgrade' <old-version>
9+ # * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
10+ # * <deconfigured's-prerm> `deconfigure' `in-favour'
11+ # <package-being-installed> <version> `removing'
12+ # <conflicting-package> <version>
13+ # for details, see http://www.debian.org/doc/debian-policy/ or
14+ # the debian-policy package
15+
16+ case " $1 " in
17+ 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
23+ sleep 1
24+ fi
25+ ;;
26+
27+ failed-upgrade)
28+ ;;
29+
30+ * )
31+ echo " prerm called with unknown argument \` $1 '" >&2
32+ exit 1
33+ ;;
34+ esac
35+
36+ exit 0
You can’t perform that action at this time.
0 commit comments