#!/bin/bash ########################################################################### ## Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3 ## ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ## ## rights of fair usage, the disclaimer and warranty conditions. ## ########################################################################### # clear IPs DAEMON_DIR='/srv/opensim/' REGION_DIR='/srv/opensim/Regions' CONFIG_DIR='/srv/opensim/config-include' sed -i "s/ExternalHostNameForLSL *=.*/ExternalHostNameForLSL = \"192.168.0.1\"/g" \ $DAEMON_DIR/OpenSim.ini; sed -i "s/ExternalHostName *=.*/ExternalHostName = 192.168.0.1/g" \ $REGION_DIR/Regions.ini; sed -i "s/HomeURI *=.*/HomeURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/Gatekeeper *=.*/Gatekeeper = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/GatekeeperURI *=.*/GatekeeperURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/SRV_HomeURI *=.*/SRV_HomeURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/SRV_InventoryServerURI *=.*/SRV_InventoryServerURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/SRV_AssetServerURI *=.*/SRV_AssetServerURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/SRV_ProfileServerURI *=.*/SRV_ProfileServerURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/SRV_GroupsServerURI *=.*/SRV_GroupsServerURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini sed -i "s/FriendsServerURI *=.*/FriendsServerURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/IMServerURI *=.*/IMServerURI = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/MapTileURL *=.*/MapTileURL = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/ExternalName *=.*/ExternalName = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/login *=.*/login = \"http:\/\/192.168.0.1:9000\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/gridname *=.*/gridname = \"Clockwerk\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/gridnick *=.*/gridnick = \"Clockwerk\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/welcome *=.*/welcome = \"http:\/\/192.168.0.1\/welcome\.php\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/register *=.*/register = \"http:\/\/192.168.0.1\/register\.php\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; sed -i "s/about *=.*/about = \"http:\/\/192.168.0.1\/about\.php\"/g" \ $CONFIG_DIR/StandaloneCommon.ini; # clear backup files find / -name *~ -exec rm -rf '{}' \; # clear log files find / -name *.log -exec truncate -s 0 '{}' \; # clear svn su root -c "rm -rf ~/.subversion" # clear iar/oar if [ -d /var/lib/iar/ ]; then rm -rf /var/lib/iar/* fi # dump database mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'drop database opensim'; mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -e 'create database opensim'; # clear asset cache rm -rf /srv/opensim/assetcache # clear history su root -c "history -c && rm -rf /root/.bash_history" su opensim -c "history -c && rm -rf /home/opensim/.bash_history" history -c halt -p