#!/bin/sh #---------------------------------------------------------------------------------- # /var/install/bin/owncloud-post-view-log - view log file # # Copyright (c) 2013-2021 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2013-02-11 jed # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------------- # read eislib etc. . /var/install/include/eislib pgmname=`basename $0` module_name="`echo "${pgmname}" | cut -d- -f1 | cut -d. -f1`" owncloudfile=/etc/config.d/${module_name} logdir=/var/log . ${owncloudfile} if [ -z "${OWNCLOUD_LOG_TYPE}" ] then OWNCLOUD_LOG_TYPE='owncloud' fi case ${OWNCLOUD_LOG_TYPE} in syslog ) rm -f ${logdir}/${module_name}.log ;; *|owncloud ) if [ -L ${logdir}/${module_name}.log ] then # not a symbolic link, create backup rm -f ${logdir}/${module_name}.log fi ;; esac exit 0