|
|
|
1 |
#!/bin/sh |
2 |
# |
3 |
# Univention Management Console Frontend Documentation |
4 |
# postinst script for the debian package |
5 |
# |
6 |
# Copyright 2012 Univention GmbH |
7 |
# |
8 |
# http://www.univention.de/ |
9 |
# |
10 |
# All rights reserved. |
11 |
# |
12 |
# The source code of this program is made available |
13 |
# under the terms of the GNU Affero General Public License version 3 |
14 |
# (GNU AGPL V3) as published by the Free Software Foundation. |
15 |
# |
16 |
# Binary versions of this program provided by Univention to you as |
17 |
# well as other copyrighted, protected or trademarked materials like |
18 |
# Logos, graphics, fonts, specific documentations and configurations, |
19 |
# cryptographic keys etc. are subject to a license agreement between |
20 |
# you and Univention and not subject to the GNU AGPL V3. |
21 |
# |
22 |
# In the case you use this program under the terms of the GNU AGPL V3, |
23 |
# the program is provided in the hope that it will be useful, |
24 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
25 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26 |
# GNU Affero General Public License for more details. |
27 |
# |
28 |
# You should have received a copy of the GNU Affero General Public |
29 |
# License with the Debian GNU/Linux or Univention distribution in file |
30 |
# /usr/share/common-licenses/AGPL-3; if not, see |
31 |
# <http://www.gnu.org/licenses/>. |
32 |
|
33 |
#DEBHELPER# |
34 |
|
35 |
if [ -r '/var/www/univention-management-console-doc/umc.xml' ]; then |
36 |
chmod o+w /usr/share/univention-dojo-api-viewer/data || true |
37 |
ln -s /usr/share/univention-dojo-api-viewer/umc.xml /var/www/umc.xml || true |
38 |
|
39 |
# We dont use --post-file here because of max_filesize in php.ini |
40 |
wget -O - 'http://127.0.0.1/univention-management-console-doc/lib/upload.php' --post-data 'dir=UMC&api=http://127.0.0.1/umc.xml' > /dev/null 2>&1 || true |
41 |
|
42 |
unlink /usr/share/univention-dojo-api-viewer/umc.xml || true |
43 |
chmod o-w /usr/share/univention-dojo-api-viewer/data || true |
44 |
|
45 |
# allow caching |
46 |
chown www-data /usr/share/univention-dojo-api-viewer/data/UMC/cache/ || true |
47 |
fi |
48 |
|
49 |
exit 0 |