mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Fix args for some helpers
This commit is contained in:
parent
6b05906483
commit
19326a4223
5 changed files with 15 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v7.0.5/seafile-server_7.0.5_stable_pi.tar.gz
|
||||
SOURCE_SUM=2fe13731bfb827004344454a54fd43723cd747d0f8a246e20771fc1a5b335da9
|
||||
SOURCE_SUM=dae9ab5d232a2b56f129aa29e7e54d2de05d838f0479955543cebcb14c9417db
|
||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||
# default: sha256
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
|
|
|
@ -19,8 +19,8 @@ ynh_script_progression --message="Loading installation settings..."
|
|||
# Retrive arguments
|
||||
old_domain=$YNH_APP_OLD_DOMAIN
|
||||
domain=$YNH_APP_NEW_DOMAIN
|
||||
old_path=$(ynh_normalize_url_path $YNH_APP_OLD_PATH)
|
||||
path_url=$(ynh_normalize_url_path $YNH_APP_NEW_PATH)
|
||||
old_path=$(ynh_normalize_url_path --path_url $YNH_APP_OLD_PATH)
|
||||
path_url=$(ynh_normalize_url_path --path_url $YNH_APP_NEW_PATH)
|
||||
seahub_port=$(ynh_app_setting_get --app $app --key seahub_port)
|
||||
fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port)
|
||||
webdav_port=$(ynh_app_setting_get --app $app --key webdav_port)
|
||||
|
|
|
@ -18,7 +18,7 @@ ynh_script_progression --message="Validating installation parameters..."
|
|||
|
||||
# Retrieve arguments
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$(ynh_normalize_url_path $YNH_APP_ARG_PATH)
|
||||
path_url=$(ynh_normalize_url_path --path_url $YNH_APP_ARG_PATH)
|
||||
server_name="$YNH_APP_ARG_SERVER_NAME"
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
is_public=$YNH_APP_ARG_PUBLIC_SITE
|
||||
|
@ -43,9 +43,9 @@ test ! -e "$final_path" || ynh_die --message "This path already contains a folde
|
|||
|
||||
# Find available ports
|
||||
ynh_script_progression --message="Finding available ports..."
|
||||
seahub_port=$(ynh_find_port 8000)
|
||||
fileserver_port=$(ynh_find_port 8082)
|
||||
webdav_port=$(ynh_find_port 8080)
|
||||
seahub_port=$(ynh_find_port --port 8000)
|
||||
fileserver_port=$(ynh_find_port --port 8082)
|
||||
webdav_port=$(ynh_find_port --port 8080)
|
||||
|
||||
# store config in yunohost
|
||||
ynh_script_progression --message="Storing installation settings..."
|
||||
|
@ -200,7 +200,7 @@ fi
|
|||
|
||||
# Add logrotate
|
||||
ynh_script_progression --message="Configuring log rotation..."
|
||||
ynh_use_logrotate $final_path/logs
|
||||
ynh_use_logrotate --logfile $final_path/logs
|
||||
ln -s $final_path/logs /var/log/seafile
|
||||
|
||||
# Add fail2ban
|
||||
|
|
|
@ -18,14 +18,14 @@ ynh_script_progression --message="Loading settings..."
|
|||
|
||||
# Retrieve arguments
|
||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||
path_url=$(ynh_normalize_url_path $(ynh_app_setting_get --app $app --key path))
|
||||
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
||||
seafile_data=/home/yunohost.app/seafile-data
|
||||
db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd)
|
||||
final_path=$(ynh_app_setting_get --app $app --key final_path)
|
||||
seafile_user=$app
|
||||
|
||||
# Check domain/path availability
|
||||
ynh_webpath_available $domain $path_url || ynh_die --message "$domain/$path_url is not available, please use an other domain or path."
|
||||
ynh_webpath_available --domain $domain --path_url $path_url || ynh_die --message "$domain/$path_url is not available, please use an other domain or path."
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
|
@ -37,7 +37,7 @@ ynh_restore
|
|||
|
||||
# Create user
|
||||
ynh_script_progression --message="Configuring system user..."
|
||||
ynh_system_user_create $seafile_user $final_path
|
||||
ynh_system_user_create --username $seafile_user $final_path
|
||||
|
||||
# Restore dependencies
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=5
|
||||
|
@ -63,7 +63,7 @@ python3 ../settings/conf/add_sso_conf.py || ynh_die --message="Your file /etc/ss
|
|||
|
||||
# Add logrotate
|
||||
ynh_script_progression --message="Configuring log rotation..."
|
||||
ynh_use_logrotate $final_path/logs
|
||||
ynh_use_logrotate --logfile $final_path/logs
|
||||
ln -s $final_path/logs /var/log/seafile
|
||||
|
||||
# Set all permissions
|
||||
|
|
|
@ -18,7 +18,7 @@ ynh_script_progression --message="Loading installation settings..."
|
|||
|
||||
# Retrieve arguments
|
||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||
path_url=$(ynh_normalize_url_path $(ynh_app_setting_get --app $app --key path))
|
||||
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
||||
installed_version=$(ynh_app_setting_get --app $app --key installed_version)
|
||||
seahub_port=$(ynh_app_setting_get --app $app --key seahub_port)
|
||||
fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port)
|
||||
|
@ -134,7 +134,7 @@ case $installed_version in
|
|||
expect_scripts/upgrade_6.3.exp $final_path/seafile-server-$seafile_version $root_pwd
|
||||
|
||||
# Update logrotate to have the last version
|
||||
ynh_use_logrotate $final_path/logs --non-append
|
||||
ynh_use_logrotate --logfile $final_path/logs --non-append
|
||||
;&
|
||||
"6.3."* )
|
||||
# Update seafile by script
|
||||
|
@ -227,7 +227,7 @@ set_permission
|
|||
|
||||
# Add logrotate
|
||||
ynh_script_progression --message="Configuring log rotation..."
|
||||
ynh_use_logrotate $final_path/logs --nonappend
|
||||
ynh_use_logrotate --logfile $final_path/logs --nonappend
|
||||
|
||||
# Add fail2ban
|
||||
ynh_script_progression --message="Configuring fail2ban..." --weight=10
|
||||
|
|
Loading…
Add table
Reference in a new issue