summaryrefslogtreecommitdiff
path: root/scripts/103.rua_upgrade.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/103.rua_upgrade.sh')
-rwxr-xr-xscripts/103.rua_upgrade.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/103.rua_upgrade.sh b/scripts/103.rua_upgrade.sh
index 424b6a4..6e401ee 100755
--- a/scripts/103.rua_upgrade.sh
+++ b/scripts/103.rua_upgrade.sh
@@ -9,8 +9,24 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
DB_DIR=/opt/dbspace
DB_RUA=$DB_DIR/.rua.db
+DB_RUA_STAT=$DB_DIR/.rua_stat.db
+
+USR_DB_DIR=/opt/usr/home/owner/.applications/dbspace
+UPGRADE_DB_RUA_STAT=$USR_DB_DIR/.rua_stat.db
# Delete DB & DB journal
rm -rf $DB_RUA
rm -rf $DB_RUA-journal
+# Copy stat DB & DB journal
+cp -rf $DB_RUA_STAT $USR_DB_DIR
+cp -rf $DB_RUA_STAT-journal $USR_DB_DIR
+
+rm -rf $DB_RUA_STAT
+rm -rf $DB_RUA_STAT-journal
+
+chmod 644 $UPGRADE_DB_RUA_STAT
+chmod 644 $UPGRADE_DB_RUA_STAT-journal
+
+chsmack -a User::Home $UPGRADE_DB_RUA_STAT
+chsmack -a User::Home $UPGRADE_DB_RUA_STAT-journal \ No newline at end of file