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:
parent
e1dbf1fb89
commit
ef5140291e
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue