Set proper executable bits
[platform/core/system/dlog.git] / scripts / dlog_upgrade.sh
1 #!/bin/sh
2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3 source /etc/tizen-platform.conf
4
5 #----------------------------------#
6 # dlog upgrade script (2.4 -> 3.0) #
7 #----------------------------------#
8
9 # Macro
10 CONF_PATH=$TZ_SYS_ETC
11 LOG_PATH=$TZ_SYS_VAR/log/dlog
12 UPGRADE_PATH=/usr/share/upgrade
13
14 # Alter conf file
15 rm $CONF_PATH/dlog_logger.conf
16 rm $CONF_PATH/dlog.conf
17 cp $UPGRADE_PATH/data/dlog.conf $CONF_PATH/dlog.conf
18 chmod 664 $CONF_PATH/dlog.conf
19 chown log:log $CONF_PATH/dlog.conf
20 chsmack -a "_" $CONF_PATH/dlog.conf
21
22 # Remove old log
23 rm $TZ_SYS_VAR/log/dlog_*
24
25 # Make directory for dlog_logger
26 mkdir -p $LOG_PATH
27 chmod 755 $LOG_PATH
28 chown log:log $LOG_PATH
29 chsmack -a System $LOG_PATH