From 3dc45da8cd7a1559dc92a525fe9ff26a11409252 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 27 Dec 2010 23:15:43 +0100 Subject: [PATCH] adapted install script to new dir structure added copyright notices --- .../bash/{log_onewire.sh => log_onewire} | 41 ++++++++++--------- misc/tools/{install.sh => install} | 38 ++++++++++++++--- 2 files changed, 54 insertions(+), 25 deletions(-) rename misc/controller/bash/{log_onewire.sh => log_onewire} (77%) rename misc/tools/{install.sh => install} (68%) diff --git a/misc/controller/bash/log_onewire.sh b/misc/controller/bash/log_onewire similarity index 77% rename from misc/controller/bash/log_onewire.sh rename to misc/controller/bash/log_onewire index 701322b..de497c6 100755 --- a/misc/controller/bash/log_onewire.sh +++ b/misc/controller/bash/log_onewire @@ -1,30 +1,33 @@ #!/bin/bash # -# Copyright (c) 2010 by Justin Otherguy -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License (either version 2 or -# version 3) as published by the Free Software Foundation. -# -# 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., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# For more information on the GPL, please go to: -# http://www.gnu.org/copyleft/gpl.html -# # This is a simple bash script to read Dallas 1-Wire sensors # with digitemp and log their values to the volkszaehler project. # # call it with a cronjob similiar to this one: # -# */5 * * * * ~/bin/log1wire.sh +# */5 * * * * ~/bin/log1wire.sh # +# @copyright Copyright (c) 2010, The volkszaehler.org project +# @package controller +# @license http://www.opensource.org/licenses/gpl-license.php GNU Public License +# @author Steffen Vogel +# +## +# This file is part of volkzaehler.org +# +# volkzaehler.org 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 3 of the License, or +# any later version. +# +# volkzaehler.org 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 volkszaehler.org. If not, see . +## # configuration # diff --git a/misc/tools/install.sh b/misc/tools/install similarity index 68% rename from misc/tools/install.sh rename to misc/tools/install index d6131c4..3479f5c 100755 --- a/misc/tools/install.sh +++ b/misc/tools/install @@ -1,6 +1,32 @@ #!/bin/bash -# Jakob Hirsch, 2010-11-20 # +# Installer +# +# For creating/updating the configuration/database +# and downloading of required libraries +# and configuration of of the PHP interpreter/webserver +# +# @copyright Copyright (c) 2010, The volkszaehler.org project +# @package tools +# @license http://www.opensource.org/licenses/gpl-license.php GNU Public License +# @author Jakob Hirsch +# +## +# This file is part of volkzaehler.org +# +# volkzaehler.org 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 3 of the License, or +# any later version. +# +# volkzaehler.org 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 volkszaehler.org. If not, see . +## # cannot handle other hosts right now db_host=localhost @@ -72,13 +98,13 @@ if [ "$REPLY" == 'y' ]; then mkdir -p $vzdir git clone $vz_git $vzdir - pushd $vzdir/backend/lib/vendor + pushd $vzdir/lib/vendor ln -s $dtdir/lib/Doctrine/ . ln -s $dtdir/lib/vendor/Symfony/ . popd fi -config=$vzdir/backend/volkszaehler.conf.php +config=$vzdir/etc/volkszaehler.conf.php ############ echo @@ -95,7 +121,7 @@ if [ "$REPLY" == "y" ]; then sed -e "s/^\(\$config\['db'\]\['user'\]\).*/\1 = '$db_user';/" \ -e "s/^\(\$config\['db'\]\['password'\]\).*/\1 = '$db_pass';/" \ -e "s/^\(\$config\['db'\]\['dbname'\]\).*/\1 = '$db_name';/" \ - < $vzdir/backend/volkszaehler.conf.template.php \ + < $vzdir/etc/volkszaehler.conf.template.php \ > $config fi @@ -108,7 +134,7 @@ if [ "$REPLY" == "y" ]; then echo creating database $db_name... mysql -h$db_host -u$db_admin_user -p$db_admin_pass -e 'CREATE DATABASE `'$db_name'`' pushd $vzdir - php backend/bin/doctrine orm:schema-tool:create + php misc/tools/doctrine orm:schema-tool:create popd echo "creating db user $db_user with proper rights..." @@ -124,7 +150,7 @@ ask "insert demo data in to database?" n if [ "$REPLY" == "y" ]; then get_admin get_db_name - cat $vzdir/share/sql/demo/entities.sql $vzdir/share/sql/demo/properties.sql $vzdir/share/sql/demo/data-demoset1.sql | + cat $vzdir/misc/sql/demo/entities.sql $vzdir/misc/sql/demo/properties.sql $vzdir/share/sql/demo/data-demoset1.sql | mysql -h$db_host -u$db_admin_user -p$db_admin_pass $db_name fi