#!/usr/bin/sh #---------------------------------------------------------------------------------- # /var/install/bin/nextcloud-pre-view-configlog - view configuration log file # # Copyright (c) 2013-2025 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2014-01-17 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`" # set platform specific parameters nextcloud_path=/var/${module_name} configfile=/etc/config.d/${module_name} logdir=/var/log NEXTCLOUD_DATA_DIR=`grep -m 1 "^NEXTCLOUD_DATA_DIR" ${configfile} | sed 's/^NEXTCLOUD_DATA_DIR[^/]*\([a-z0-9/_-]*\).*$/\1/'` if [ -n "${NEXTCLOUD_DATA_DIR}" ] then nextcloud_path="`echo "${NEXTCLOUD_DATA_DIR}" | sed 's#[/ ]*$##'`" fi nextcloud_logpath=${nextcloud_path}/ # create symbolic link ln -sf ${nextcloud_path}/${module_name}-configlog ${logdir}/${module_name}-configlog exit 0