blob: dbd350d17a1b8b1ffab6ed3057b30e58161b1bf2 (
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
|
post_install() {
echo
echo -n ">>> Creating yacy system user and group... "
getent group yacy &>/dev/null || groupadd -r yacy
getent passwd yacy &>/dev/null || /usr/sbin/useradd --comment 'YaCy P2P Searchengine' --system -g yacy --home '/usr/share/yacy/' -s /bin/false yacy
mkdir -p /var/lib/yacy
chown -R yacy:yacy /var/lib/yacy /opt/yacy
rm -f /usr/share/yacy/DATA
ln -s /var/lib/yacy /usr/share/yacy/DATA
echo "done"
echo
}
post_upgrade() {
chown -R yacy:yacy /var/lib/yacy /opt/yacy
systemctl --system daemon-reload
}
pre_remove() {
echo
echo -n ">>> Removing yacy system user and group... "
getent passwd yacy &>/dev/null &&
/usr/sbin/userdel yacy &>/dev/null
getent group yacy &>/dev/null &&
groupdel yacy &>/dev/null
rm -f /usr/share/yacy/DATA
echo "done"
echo
}
post_remove() {
echo
echo "-> All configfiles and the cache are in /var/lib/yacy/"
echo "-> You may use this for another installation."
echo "-> If you don't need it, you should delete it, because"
echo "-> it may have grown very large"
}
|