#!/bin/bash git_local_repo=~/flab-sfa # First things first : # Nuke the database sudo sfaadmin.py registry nuke # ATTENTION :Save the config file /etc/sfa/sfa_config # before continuing # Remove all the remaining gid, creds files # of the server sudo rm -rf /var/lib/sfa cd /etc/sfa sudo rm -rf * sudo service sfa restart # Drop table in slab_sfa # to avoid duplicates. psql -d slab_sfa -U sfa -W -q -c "drop table slice_senslab;" # Put back the config file that you saved before cd $git_local_repo/sfa/senslab/ sudo make clean make sudo python setup.py install sudo service sfa restart # Wrote /etc/sfa/configs/site.xml # Merged # /etc/sfa/default_config.xml # and /etc/sfa/configs/site.xml # into /etc/sfa/sfa_config.xml sudo cp $git_local_repo/sfa/senslab/config/sfa_config /etc/sfa/sfa_config sudo cp $git_local_repo/sfa/senslab/config/sfa_config.xml /etc/sfa/sfa_config.xml sudo cp $git_local_repo/sfa/senslab/config/site.xml /etc/sfa/configs/site.xml # sudo ln -s ldap_config.py /etc/sfa/ldap_config.py sudo cp $git_local_repo/sfa/senslab/config/ldap_config.py /etc/sfa/ldap_config.py # User stuff : clean your folder cd ~/.sfi rm *.sscert *.cred *.gid cd ~ # Import the datbase form ldap sudo sfaadmin.py registry import_registry sudo service sfa restart