
| Current Path : /var/www/web-klick.de/dsh/90_akt/DEV1303/Resources/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/web-klick.de/dsh/90_akt/DEV1303/Resources/install_bundle.sh |
#!/bin/sh APACHE_USER="www-data" APACHE_GROUP="www-data" APACHE_ETC="/etc/apache2" cur_dir="`pwd`" if [ `whoami` != root ]; then echo "This script must be run as root! (sudo $0)" exit fi if [ ! -f "$1" ]; then echo "no bundle found to install" echo "usage: $0 autotest.zip" exit fi zip_file="$1" unzip -qo "$zip_file" -d "/opt/autotest" chown -R $APACHE_USER:$APACHE_GROUP "/opt/autotest" chmod a+rw "/opt/autotest/cgi-bin/test_projects" chmod u+x "/opt/autotest/cgi-bin/autotest/index.cgi" if [ ! -h "/opt/autotest/projects" ]; then ln -sf "/opt/autotest/cgi-bin/test_projects" "/opt/autotest/projects" fi mv -f "/opt/autotest/apache_linux.conf" "$APACHE_ETC/sites-available/autotest" if [ -h "$APACHE_ETC/sites-enabled/000-default" ]; then echo "Removing default apache configuration. To restore, run 'a2dissite autotest' and 'a2ensite default' as root." a2dissite default > /dev/null a2ensite autotest > /dev/null apachectl restart 2> /dev/null echo "Installation complete. Goto http://localhost with your browser." elif [ -f "$APACHE_ETC/sites-enabled/000-default" ]; then echo "No default installation found, canceling automatic installation." echo "Remove and/or backup '$APACHE_ETC/sites-enabled/000-default' and run 'a2ensite autotest'" exit else a2ensite autotest > /dev/null apachectl restart 2> /dev/null echo "Installation complete. Goto http://localhost with your browser." fi