diff options
author | Imran Zaman <imran.zaman@intel.com> | 2013-06-17 18:05:14 +0300 |
---|---|---|
committer | Imran Zaman <imran.zaman@intel.com> | 2013-06-17 18:05:14 +0300 |
commit | 295c3b3222fbf7f414c5802c6af86bedadbc009a (patch) | |
tree | d7c03f9b752a4b5ddcaffa2fb18e587f27872f8f /tools/setup-and-start-daemon.sh | |
parent | 06161b99c5bfa1244649647ed0d66d7800f93c57 (diff) | |
download | gsignond-295c3b3222fbf7f414c5802c6af86bedadbc009a.tar.gz gsignond-295c3b3222fbf7f414c5802c6af86bedadbc009a.tar.bz2 gsignond-295c3b3222fbf7f414c5802c6af86bedadbc009a.zip |
updated distribution specific changessubmit/tizen/20130617.151432accepted/tizen/20130617.174626
Diffstat (limited to 'tools/setup-and-start-daemon.sh')
-rwxr-xr-x | tools/setup-and-start-daemon.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/setup-and-start-daemon.sh b/tools/setup-and-start-daemon.sh new file mode 100755 index 0000000..a7ecd8b --- /dev/null +++ b/tools/setup-and-start-daemon.sh @@ -0,0 +1,54 @@ +SRC_HOME="." +with_duma=0 +with_gdb=0 + +if test $# -ge 1 ; then + if test "$1" == "--with-duma" ; then + with_duma=1 + with_gdb=1 + else + with_duma=0 + if test "$1" == "--with-gdb" ; then + with_gdb=1 + fi + fi +fi + +killall gsignond + +export SSO_SECRET_PATH="/tmp/gsignond" +export SSO_STORAGE_PATH="/tmp/gsignond" +if [ -f "$SRC_HOME/test/daemon/.libs/lt-daemontest" ] ; then +export SSO_KEYCHAIN_SYSCTX="$SRC_HOME/test/daemon/.libs/lt-daemontest" +else +export SSO_KEYCHAIN_SYSCTX="$SRC_HOME/test/daemon/.libs/daemontest" +fi +export SSO_BIN_DIR=$SRC_HOME/src/daemon/.libs +export SSO_PLUGINS_DIR=$SRC_HOME/src/plugins/.libs +export LD_LIBRARY_PATH="$SRC_HOME/src/daemon/plugins/plugind/.libs:$SRC_HOME/src/daemon/plugins/.libs" +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SRC_HOME/src/common/.libs:$SRC_HOME/src/common/db/.libs:$SRC_HOME/src/daemon/.libs:$SRC_HOME/src/daemon/db/.libs:$SRC_HOME/src/daemon/dbus/.libs" +export G_MESSAGES_DEBUG="all" + +# Clean db +rm -rf /tmp/gsignond + +echo "--------------------------" +echo "with_duma: $with_duma" +echo "with_gdb: $with_gdb" +echo "--------------------------" +if test $with_duma -eq 1 ; then + export G_SLICE="always-malloc" + export DUMA_PROTECT_FREE=1 + export DUMA_PROTECT_BELOW=1 + + LD_PRELOAD="libduma.so" $SRC_HOME/src/daemon/.libs/gsignond & + + if test $with_gdb -eq 1 ; then + sudo gdb --pid=`pidof gsignond` + fi +elif test $with_gdb -eq 1 ; then + gdb $SRC_HOME/src/daemon/.libs/gsignond +else + $SRC_HOME/src/daemon/.libs/gsignond +fi + |