mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Set var in db
This commit is contained in:
parent
cdf189a93b
commit
1917469792
3 changed files with 20 additions and 5 deletions
10
conf/init_calibre_db
Normal file
10
conf/init_calibre_db
Normal file
|
@ -0,0 +1,10 @@
|
|||
config_calibre_dir=\"$calibre_dir\"
|
||||
config_port=$port
|
||||
config_certfile;''
|
||||
config_keyfile;''
|
||||
config_use_google_drive;0
|
||||
config_remote_login;0
|
||||
config_use_goodreads;0
|
||||
config_logfile;''
|
||||
config_converterpath;''
|
||||
config_calibre;''
|
3
conf/init_calibre_db_user
Normal file
3
conf/init_calibre_db_user
Normal file
|
@ -0,0 +1,3 @@
|
|||
nickname=\"$admin\"
|
||||
default_language=\'$language\'
|
||||
password='$(python ../conf/generate_password_hash.py $password $final_path/vendor)'
|
|
@ -139,11 +139,13 @@ chown -R $app:$app /var/log/$app
|
|||
systemctl start $app
|
||||
sleep 5s
|
||||
systemctl stop $app
|
||||
sqlite3 $final_path/app.db "UPDATE settings SET config_calibre_dir=\"$calibre_dir\" WHERE ID=1"
|
||||
sqlite3 $final_path/app.db "UPDATE settings SET config_port=$port WHERE ID=1"
|
||||
sqlite3 $final_path/app.db "UPDATE user SET nickname=\"$admin\" WHERE ID=1"
|
||||
sqlite3 $final_path/app.db "UPDATE user SET default_language=\"$language\" WHERE ID=1"
|
||||
sqlite3 $final_path/app.db "UPDATE user SET password='$(python ../conf/generate_password_hash.py $password $final_path/vendor)' WHERE ID=1"
|
||||
for i in $(cat ../conf/init_calibre_db)
|
||||
sqlite3 $final_path/app.db "UPDATE settings SET $i WHERE ID=1"
|
||||
done
|
||||
|
||||
for i in $(cat ../conf/init_calibre_db_user)
|
||||
sqlite3 $final_path/app.db "UPDATE user SET $i WHERE ID=1"
|
||||
done
|
||||
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue