blob: 7ec8a6fb11e7f467303c5d9165609fbc8d0c703d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
post_install() {
#installing python depends into venv
cd /usr/share/powershell-empire
virtualenv -p python3 env
source env/bin/activate
# setuptools 57 needed because >= 58 breaks requirements
pip3 install setuptools==57
pip3 install -r "/etc/powershell-empire/requirements.txt"
deactivate
# generate a certificate if it's missing
if [ ! -e /usr/share/powershell-empire/data/empire-priv.key ]; then
cd /usr/share/powershell-empire/setup && ./cert.sh
fi
}
post_upgrade() {
post_install
}
pre_remove() {
cd /usr/share/powershell-empire
source env/bin/activate
pip3 uninstall -y -r "/etc/powershell-empire/requirements.txt"
deactivate
sudo rm -r /usr/share/powershell-empire/data/*
sudo rm -r /usr/share/powershell-empire
sudo rm -r /var/lib/powershell-empire
}
|