blob: ec8fab092415de99f701ca2a7bc3d3212b25d57d (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
post_install() {
# Adding all users to the input group
for user in `ls /home`
do
gpasswd -a $user input
done
# Create the link to the binary
ln -sf '/opt/Shadow Beta/shadow-preprod' '/usr/bin/shadow-beta'
}
post_remove() {
# Remove configuration
for user in `ls /home`
do
if [ -d /home/$user/.config/Shadow\ Beta ]; then
rm -R /home/$user/.config/Shadow\ Beta
fi
if [ -d /home/$user/.config/shadow-beta ]; then
rm -R /home/$user/.config/shadow-beta
fi
if [ -d /home/$user/.config/shadowbeta ]; then
rm -R /home/$user/.config/shadowbeta
fi
if [ -d /home/$user/.config/shadow-preprod ]; then
rm -R /home/$user/.config/shadow-preprod
fi
done
}
pre_upgrade(){
# Delete the old version of Shadow
if [ -d "/opt/Shadow Beta" ]; then
rm -r "/opt/Shadow Beta"
fi
# Delete the old version of Shadow
if [ -d "/opt/shadowbeta" ]; then
rm -r "/opt/shadowbeta"
fi
}
post_upgrade(){
# Replace current shortcut with the new one
ln -sf '/opt/Shadow Beta/shadow-preprod' '/usr/bin/shadow-beta'
}
|