1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lufi_ynh.git synced 2024-09-03 19:36:28 +02:00

Fix migration from sqlite

This commit is contained in:
Kayou 2019-03-27 21:11:45 +01:00
parent e1dbf1fb89
commit ef5140291e
No known key found for this signature in database
GPG key ID: 823A2CBE071D3126

View file

@ -170,6 +170,19 @@ ynh_add_systemd_config
pushd $final_path
# Migrate from SQLite to PostgreSQL
if [ $need_migration_from_sqlite_to_psql -eq 1 ]; then
# Preinstall with sqlite
carton install --deployment --without=mysql --without=htpasswd --without=test
# if /var/log/$app/production.log is a symbolic link, then move it to $final_path/log/production.log
if [ ! -L "/var/log/$app/production.log" ]
then
mv "/var/log/$app/production.log" "$final_path/log/production.log"
chown -R $app: "$final_path/log/production.log"
fi
# Restart with news parameters
ynh_systemd_action -n $app -a restart -l "Creating process id file" -p "$final_path/log/production.log"
carton exec script/lufi sqliteToOtherDB
fi