|
|
|
1 |
# Univention Common Python Library |
2 |
# |
3 |
# Copyright 2011 Univention GmbH |
4 |
# |
5 |
# http://www.univention.de/ |
6 |
# |
7 |
# All rights reserved. |
8 |
# |
9 |
# The source code of this program is made available |
10 |
# under the terms of the GNU Affero General Public License version 3 |
11 |
# (GNU AGPL V3) as published by the Free Software Foundation. |
12 |
# |
13 |
# Binary versions of this program provided by Univention to you as |
14 |
# well as other copyrighted, protected or trademarked materials like |
15 |
# Logos, graphics, fonts, specific documentations and configurations, |
16 |
# cryptographic keys etc. are subject to a license agreement between |
17 |
# you and Univention and not subject to the GNU AGPL V3. |
18 |
# |
19 |
# In the case you use this program under the terms of the GNU AGPL V3, |
20 |
# the program is provided in the hope that it will be useful, |
21 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 |
# GNU Affero General Public License for more details. |
24 |
# |
25 |
# You should have received a copy of the GNU Affero General Public |
26 |
# License with the Debian GNU/Linux or Univention distribution in file |
27 |
# /usr/share/common-licenses/AGPL-3; if not, see |
28 |
# <http://www.gnu.org/licenses/>. |
29 |
|
30 |
|
31 |
createLogfile () { |
32 |
DATEINAME=$(echo "$1" | sed -ne "s/-*//p") |
33 |
if [ ! -e "$DATEINAME" ] ; then |
34 |
touch "$DATEINAME" |
35 |
chown "$2" "$DATEINAME" |
36 |
chmod "$3" "$DATEINAME" |
37 |
fi |
38 |
} |
39 |
|