mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Fix linter warnings
This commit is contained in:
parent
69b86b123d
commit
db8e39baf5
6 changed files with 18 additions and 38 deletions
|
@ -38,12 +38,11 @@
|
||||||
# setup_sub_dir=1
|
# setup_sub_dir=1
|
||||||
# setup_root=1
|
# setup_root=1
|
||||||
# upgrade=1 from_commit=3b9c5041e4fa73cb965368379f2b83d076c65341
|
# upgrade=1 from_commit=3b9c5041e4fa73cb965368379f2b83d076c65341
|
||||||
;;; Levels
|
|
||||||
Level 5=auto
|
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=nicolas@aubonalbanais.ovh
|
Email=nicolas@aubonalbanais.ovh
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=11f5b96df7d8850beff47f9904745fa53a6f7ed9
|
; commit=11f5b96df7d8850beff47f9904745fa53a6f7ed9
|
||||||
name=Version 0.96.0~ynh4
|
name=Version 0.96.0~ynh4
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&is_public=1&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&is_public=1&
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
},
|
},
|
||||||
"version": "0.96.9~ynh5",
|
"version": "0.96.9~ynh5",
|
||||||
"url": "https://github.com/janeczku/calibre-web",
|
"url": "https://github.com/janeczku/calibre-web",
|
||||||
"license": "free",
|
"license": "GPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "Krakinou",
|
"name": "Krakinou",
|
||||||
"email": "misterl56@hotmail.com"
|
"email": "misterl56@hotmail.com"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.7.1"
|
"yunohost": ">= 3.8.1"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -27,7 +27,7 @@ ynh_multimedia_build_main_dir () {
|
||||||
local checksum="806a827ba1902d6911095602a9221181"
|
local checksum="806a827ba1902d6911095602a9221181"
|
||||||
|
|
||||||
# Download yunohost.multimedia scripts
|
# Download yunohost.multimedia scripts
|
||||||
wget -nv https://github.com/Yunohost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz
|
wget -nv https://github.com/Yunohost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz 2>&1
|
||||||
|
|
||||||
# Check the control sum
|
# Check the control sum
|
||||||
echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \
|
echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -27,8 +28,6 @@ if [ $is_public -eq 1 ]; then
|
||||||
public_library=1
|
public_library=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source _common.sh
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -36,7 +35,6 @@ source _common.sh
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -45,9 +43,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
|
|
||||||
# Normalize the url path syntax
|
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
|
||||||
|
|
||||||
# Check web path availability
|
# Check web path availability
|
||||||
ynh_webpath_available $domain $path_url
|
ynh_webpath_available $domain $path_url
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
|
@ -63,7 +58,6 @@ ynh_app_setting_set $app path $path_url
|
||||||
ynh_app_setting_set $app admin $admin
|
ynh_app_setting_set $app admin $admin
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set $app is_public $is_public
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -192,16 +186,6 @@ 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"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions to app files
|
|
||||||
#disabled - do not work when calibreweb is not owner
|
|
||||||
#chown -R root: $final_path
|
|
||||||
#chown $app: $final_path/app.db
|
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -210,10 +194,10 @@ eval sqlite3 $final_path/app.db "$conf"
|
||||||
ynh_store_file_checksum "${final_path}/app.db"
|
ynh_store_file_checksum "${final_path}/app.db"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
yunohost service add $app --description "Browse eBook in the web" --log "/var/log/$app/$app.log"
|
yunohost service add $app --description="Browse eBook in the web" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
@ -230,7 +214,6 @@ if [ $public_library -eq 0 ]; then
|
||||||
yunohost app addaccess $app -u $admin
|
yunohost app addaccess $app -u $admin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -19,6 +20,7 @@ ynh_abort_if_errors
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading settings..." --weight=1
|
ynh_script_progression --message="Loading settings..." --weight=1
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
|
@ -27,7 +29,6 @@ final_path=$(ynh_app_setting_get $app final_path)
|
||||||
calibre_dir=$(ynh_app_setting_get $app calibre_dir)
|
calibre_dir=$(ynh_app_setting_get $app calibre_dir)
|
||||||
is_public=$(ynh_app_setting_get $app is_public)
|
is_public=$(ynh_app_setting_get $app is_public)
|
||||||
port=$(ynh_app_setting_get $app port)
|
port=$(ynh_app_setting_get $app port)
|
||||||
source ../settings/scripts/_common.sh
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE RESTORED
|
# CHECK IF THE APP CAN BE RESTORED
|
||||||
|
@ -99,7 +100,7 @@ curl https://bootstrap.pypa.io/get-pip.py | python3
|
||||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
|
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||||
systemctl enable $app.service
|
systemctl enable $app.service --quiet
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
|
|
@ -10,6 +10,7 @@ version_gt() {
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -34,8 +35,6 @@ ynh_app_setting_set $app calibre_dir $calibre_dir
|
||||||
upload=$(sqlite3 $final_path/app.db "SELECT config_uploading FROM settings WHERE ID=1")
|
upload=$(sqlite3 $final_path/app.db "SELECT config_uploading FROM settings WHERE ID=1")
|
||||||
ynh_app_setting_set $app upload $upload
|
ynh_app_setting_set $app upload $upload
|
||||||
|
|
||||||
source _common.sh
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -86,13 +85,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=2
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="stop"
|
ynh_systemd_action --service_name=$app --action="stop"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK THE PATH
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Normalize the URL path syntax
|
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -224,6 +216,12 @@ ynh_add_systemd_config
|
||||||
# Set permissions on app files
|
# Set permissions on app files
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
yunohost service add $app --description="Browse eBook in the web" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -262,4 +260,3 @@ ynh_systemd_action --service_name=$app --action="start" -l "server on :$port" -t
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue