Space is missing before closing bracket,
so error is observed (on Tizen:IVI):
( 31/162) Removing email-service-0.10.103-23.72 [done]
Additional rpm output:
/var/tmp/rpm-tmp.0voxr9: line 1: [: missing `]'
Also it's prefered to put constants before variable in comparaisons,
(BTW '!=' or '=' not '==')
Change-Id: I728cc88cb023fc843a8807eca50da8cab73bb16a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
chsmack -a "User" %{TZ_SYS_DATA}/email/res/email-service.sql
systemctl daemon-reload
-if [ $1 == 1 ]; then
+if [ 1 = $1 ]; then
systemctl restart email.service
fi
%preun
-if [ $1 == 0]; then
+if [ 0 = $1 ]; then
systemctl stop email.service
fi