25 lines
1.2 KiB
Bash
25 lines
1.2 KiB
Bash
#!/bin/bash
|
|
if [ ! -d /var/cache/kylin-system-updater ];then
|
|
mkdir -p /var/cache/kylin-system-updater
|
|
fi
|
|
if [ ! -f /var/cache/kylin-system-updater/kylin-system-updater.db ];then
|
|
echo "Copying database to the specified path ..."
|
|
cp -r /usr/share/kylin-system-updater/kylin-system-updater.db /var/cache/kylin-system-updater/
|
|
fi
|
|
systemctl enable kylin-system-updater.service
|
|
|
|
mkdir -p /var/lib/unattended-upgrades
|
|
chmod +x /usr/bin/kylin-unattended-upgrade
|
|
chmod +x /usr/bin/kylin-unattended-upgrade-shutdown
|
|
systemctl enable kylin-unattended-upgrades.service
|
|
|
|
if [ -f /usr/share/kylin-system-updater/SystemUpdater/Core/DataMigration.py ];then
|
|
# echo "Database record migration"
|
|
# /usr/share/kylin-system-updater/SystemUpdater/Core/DataMigration.py -m
|
|
/usr/share/kylin-system-updater/SystemUpdater/Core/DataMigration.py -u appname_cn=
|
|
/usr/share/kylin-system-updater/SystemUpdater/Core/DataMigration.py -t=tid_search
|
|
/usr/share/kylin-system-updater/SystemUpdater/Core/DataMigration.py -u status_cn=
|
|
/usr/share/kylin-system-updater/SystemUpdater/Core/DataMigration.py -u changelog=
|
|
/usr/share/kylin-system-updater/SystemUpdater/Core/DataMigration.py -f init_version="yes"
|
|
fi
|