adding pre-restart hook to run syncdb.