blob: b8cbdc2aa1f7073c1ddba9c946f4e692f1f2e846 (
plain) (
tree)
|
|
#!/bin/bash
#
# Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
# This program is free software distributed under the GPL version 2.
# See http://gpl.openslx.org/
#
# If you have any feedback please consult http://feedback.openslx.org/ and
# send your suggestions, praise, or complaints to feedback@openslx.org
#
# General information about OpenSLX can be found at http://openslx.org/
# Absolute path to this script. /home/user/bin/foo.sh
echo "Copying to /var/www/"
sourceDir = dirname $0
targetDir = "/var/www/pbs2/"
cp -R $sourceDir $targetDir
echo "Creating pbs2 host..."
ln -s /usr/share/php/libzend-framework-php/Zend/ /var/www/pbs2/library/Zend
cat > /etc/apache2/sites-available/pbs2 << EOF
<VirtualHost *:80>
ServerName $domain
ServerAdmin admin@$domain
DocumentRoot /var/www/pbs2/public
<Directory /var/www/pbs2/public >
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
EOF
echo "Enabling pbs2 host..."
a2ensite pbs2
echo "Restarting apache..."
etc/init.d/apache2 restart
echo "Creating config of pbs2..."
cp /var/www/pbs2/application/configs/application.ini.dist /var/www/pbs2/application/configs/application.ini
echo "Please enter the database user"
read databaseuser
sed -e 13s/$/$databaseuser/ -i /var/www/pbs2/application/configs/application.ini
echo "Please enter the database password for user $databaseuser"
read databasepassword
sed -e 14s/$/$databasepassword/ -i /var/www/pbs2/application/configs/application.ini
echo "Creating database and tables"
mysql -u $databaseuser -p$databasepassword < /var/www/pbs2/setup/pbs.sql
mysql -u $databaseuser -p$databasepassword < /var/www/pbs2/setup/pbs.sql
echo "woho - pbs2 is ready to use"
echo "You can reach your installed pbs2 server under http://$domain/"
echo "Login with username: 'test' and pasword 'test' and change the Passwort and eMail IMMEDIATELY!!!"
|