mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Test with empty dir
This commit is contained in:
parent
fdf22ac584
commit
768b42a081
1 changed files with 9 additions and 10 deletions
|
@ -148,22 +148,22 @@ chown -R $app:$app /var/log/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Setting up database and settings"
|
ynh_print_info "Setting up database and settings"
|
||||||
#we need to start and stop the service so that initial app.db file is created and that we can set default data
|
#we need to start and stop the service so that initial app.db file is created and that we can set default data
|
||||||
systemctl start $app
|
#systemctl start $app
|
||||||
#sleep required on low spec like raspberryPi
|
#sleep required on low spec like raspberryPi
|
||||||
sleep 5s
|
sleep 5s
|
||||||
systemctl stop $app
|
systemctl stop $app
|
||||||
|
|
||||||
#set database settings as per conf file
|
#set database settings as per conf file
|
||||||
conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_settings))) WHERE ID=1\""
|
#conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_settings))) WHERE ID=1\""
|
||||||
eval sqlite3 $final_path/app.db "$conf"
|
#eval sqlite3 $final_path/app.db "$conf"
|
||||||
|
|
||||||
conf="\"UPDATE user SET $(. <(echo -E echo $(<../conf/init_calibre_db_user))) WHERE ID=1\""
|
#conf="\"UPDATE user SET $(. <(echo -E echo $(<../conf/init_calibre_db_user))) WHERE ID=1\""
|
||||||
eval sqlite3 $final_path/app.db "$conf"
|
#eval sqlite3 $final_path/app.db "$conf"
|
||||||
|
|
||||||
#mise à jour du mot de passe (je ne sais pas pourquoi, je n'arrive pas à l'intégrer dans le fichier de conf, pb de " et ')
|
#mise à jour du mot de passe (je ne sais pas pourquoi, je n'arrive pas à l'intégrer dans le fichier de conf, pb de " et ')
|
||||||
ynh_print_OFF
|
#ynh_print_OFF
|
||||||
sqlite3 $final_path/app.db "UPDATE user SET password='$(python ../conf/generate_password_hash.py $pass $final_path/vendor)' WHERE ID=1"
|
#sqlite3 $final_path/app.db "UPDATE user SET password='$(python ../conf/generate_password_hash.py $pass $final_path/vendor)' WHERE ID=1"
|
||||||
ynh_print_ON
|
#ynh_print_ON
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -172,7 +172,6 @@ ynh_print_ON
|
||||||
|
|
||||||
yunohost service add $app --log "/var/log/$app/$app.log"
|
yunohost service add $app --log "/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -195,6 +194,6 @@ systemctl start $app
|
||||||
# WARNING FOR READ ACCESS
|
# WARNING FOR READ ACCESS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [[ ! $create_dir = 1 ]] ; then
|
if [[ ! $create_dir = 0 ]] ; then
|
||||||
ynh_print_warn "Please, give required access to $app user to the $calibre_dir folder."
|
ynh_print_warn "Please, give required access to $app user to the $calibre_dir folder."
|
||||||
fi
|
fi
|
Loading…
Add table
Reference in a new issue