blob: db0bc1d5fde2c3a3b1031e4aad0497eeb534dae3 (
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
|
pkgname=mediagoblin-git
post_install() {
if [ ! `grep mediagoblin /etc/group` ]; then
groupadd mediagoblin &>/dev/null;
fi
id mediagoblin &>/dev/null || \
useradd -g mediagoblin -d /var/lib/mediagoblin -s /bin/false mediagoblin
/usr/bin/systemd-tmpfiles --create mediagoblin.conf
chown -R mediagoblin:mediagoblin /var/run/mediagoblin /var/lib/mediagoblin
cd /usr/share/webapps/mediagoblin/
/bin/su -s /bin/sh -c "/usr/share/webapps/mediagoblin/bin/gmg dbupdate" mediagoblin
}
post_upgrade() {
cd /usr/share/webapps/mediagoblin/
/bin/su -s /bin/sh -c "/usr/share/webapps/mediagoblin/bin/gmg dbupdate" mediagoblin
}
pre_remove() {
/usr/bin/systemd-tmpfiles --remove mediagoblin.conf
userdel mediagoblin &> /dev/null
groupdel mediagoblin &> /dev/null
}
|