#!/bin/bash # # 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. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston MA 02110-1301 USA DBC_PMB_CONFFILE_DIR="/usr/share/llxcfg/config" DBC_PMB_CONFFILE="pmb/conf/pmb.conf" DBC_DEBIAN_DB="/etc/pmb/debian-db.php" DBC_PMB="/etc/dbconfig-common/pmb.conf" PMB_INST_PERMS="600" PMB_CONFFILE_OWNER="root" PMB_CONFFILE_WWW="root" PMB_CONFFILE_GROUP="root" PMB_PASSWD_FILE="/etc/pmb/pmb_passwd" PMB_PASSWD="$(cat $PMB_PASSWD_FILE 2>/dev/null | head -1)" COMMENT_INIT="#--LLXCFG_INI--#" COMMENT_END="#--LLXCFG_END--#" PMB_SITE="http://pmb" INCLUDE_LLIUREX_CONF="Redirect /pmb ${PMB_SITE}" if [ -f "$DBC_PMB" ]; then llxcfg-config read "$DBC_PMB_CONFFILE" | sed -e "s%__PMB_PASS__%$PMB_PASSWD%g" | skel-install --mode="$PMB_INST_PERMS" --owner="$PMB_CONFFILE_OWNER" --group="$PMB_CONFFILE_GROUP" "$DBC_PMB" rm -f /usr/share/llxcfg-httpd/httpd/pmb rm -f /usr/share/llxcfg-httpd/httpd/biblioteca ln -sf /usr/share/pmb/www /usr/share/llxcfg-httpd/httpd/pmb ln -sf /usr/share/pmb/www /usr/share/llxcfg-httpd/httpd/biblioteca fi exit 0