Browse Source

* added 99-final files to tardiba (the sitebuilder and xsshadminpg.cfg)

git-svn-id: svn+ssh://svn.opensde.net/home/users/karasz/x5/tardiba/trunk@51 471cc25b-571d-0410-8e29-1f4f9b506cef
master
Nagy Karoly Gabriel 17 years ago
parent
commit
95fbf1fbf1
3 changed files with 47 additions and 0 deletions
  1. BIN
      99-final/phpfiles.tar.gz
  2. +41
    -0
      99-final/sitebuilder.sh
  3. +6
    -0
      99-final/sshadminpg.cfg

BIN
99-final/phpfiles.tar.gz


+ 41
- 0
99-final/sitebuilder.sh

@ -0,0 +1,41 @@
#!/bin/bash
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: target/tardiba/99-final/sitebuilder.sh
# Copyright (C) 2007 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
SITE_ROOT="$1"
SITE_DB="$2"
DB_IP="$3"
DB_PORT="$4"
lighttpd_config="/etc/opt/lighttpd/lighttpd.conf"
DOC_ROOT=`grep 'simple-vhost.server-root' $lighttpd_config | awk {'print $3'} | sed 's,\",,g'`
TEMPLATE="/usr/share/sitebuilder/phpfiles.tar.gz"
if [ "$SITE_ROOT" ]; then
if [ ! -d $DOC_ROOT/$SITE_ROOT ]; then
mkdir -p $DOC_ROOT/$SITE_ROOT/pages
cd $DOC_ROOT/$SITE_ROOT/pages
tar xzvf $TEMPLATE
db_to_replace=`grep '^\$dbname' $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php | awk {'print $3'} | sed s,\",,g`
sed -e "s,$db_to_replace,$SITE_DB,g" -i $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php
ip_to_replace=`grep '^\$host' $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php | awk {'print $3'} | sed s,\",,g`
sed -e "s,$ip_to_replace,$DB_IP,g" -i $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php
port_to_replace=`grep '^\$dbname' $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php | awk {'print $3'} | sed s,\",,g`
sed -e "s,$ip_to_replace,$DB_IP,g" -i $DOC_ROOT/$SITE_ROOT/pages/dbconnection.php
else
exit 1;
fi
fi
exit 0;

+ 6
- 0
99-final/sshadminpg.cfg

@ -0,0 +1,6 @@
pathDumpDir = /var/opt/postgresql/data/dumps/
pathPGbinaries = /opt/postgresql/bin/
SUpostgres = su - postgres -c
cmdMakeDumpDir = /opt/postgresql/bin/pg_backup.sh configtest
cmdPGrestart = sv h /service/postgresql
cmdPGstatus = sv -l /service/postgresql

Loading…
Cancel
Save