Checking NULL value for user_name
[platform/core/messaging/email-service.git] / email-service
1 #!/bin/sh
2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3
4 source /etc/tizen-platform.conf
5
6 account_count=$(sqlite3 ${TZ_USER_DB}/.email-service.db "select COUNT(*) from mail_account_tbl")
7 if [ "$(echo "$account_count" | cut -c0-1)" == "0" ]
8 then
9         echo 'There is no account'
10 elif [ "$(echo "$account_count" | cut -c0-1)" == "" ]
11 then
12         echo 'DB failure'
13 else
14         /usr/bin/email-service &
15 fi