blob: d4868265ee5be468da29df6458f5beeed414b215 (
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
|
## arg 1: the old package version
pre_remove()
{
for f in /usr/share/sisiya-webui-php/index.php /usr/share/sisiya-webui-php/images/links /usr/share/sisiya-webui-php/images/systems /usr/share/sisiya-webui-php/images/tmp /usr/share/sisiya-webui-php/packages /usr/share/sisiya-webui-php/xmlconf
do
rm -f $f
done
for d in /var/tmp/sisiya-webui-php /var/lib/sisiya-webui-php/links
do
rm -rf $d
done
}
## arg 1: the new package version
post_install() {
if test ! -h /usr/share/sisiya-webui-php/index.php ; then
ln -s /usr/share/sisiya-webui-php/sisiya_gui.php /usr/share/sisiya-webui-php/index.php
fi
if test ! -h /usr/share/sisiya-webui-php/images/links ; then
mkdir -p /var/lib/sisiya-webui-php/links
ln -s /var/lib/sisiya-webui-php/links /usr/share/sisiya-webui-php/images/links
fi
if test ! -h /usr/share/sisiya-webui-php/images/systems ; then
ln -s /var/lib/sisiya-webui-images /usr/share/sisiya-webui-php/images/systems
fi
if test ! -h /usr/share/sisiya-webui-php/images/tmp ; then
mkdir -p /var/tmp/sisiya-webui-php
ln -s /var/tmp/sisiya-webui-php /usr/share/sisiya-webui-php/images/tmp
fi
if test ! -h /usr/share/sisiya-webui-php/packages ; then
ln -s /var/lib/sisiya-webui-php/packages /usr/share/sisiya-webui-php/packages
fi
if test ! -h /usr/share/sisiya-webui-php/xmlconf ; then
ln -s /etc/sisiya/sisiya-remote-checks/conf.d /usr/share/sisiya-webui-php/xmlconf
fi
chown -R http /usr/share/sisiya-webui-php
chown -R http /var/lib/sisiya-webui-php
chown -R http /var/tmp/sisiya-webui-php
}
|