Fix args for some helpers

This commit is contained in:
Josué Tille 2019-10-01 20:53:33 +02:00
parent 6b05906483
commit 19326a4223
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
5 changed files with 15 additions and 15 deletions

View file

@ -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_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...) # (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256 # default: sha256
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum

View file

@ -19,8 +19,8 @@ ynh_script_progression --message="Loading installation settings..."
# Retrive arguments # Retrive arguments
old_domain=$YNH_APP_OLD_DOMAIN old_domain=$YNH_APP_OLD_DOMAIN
domain=$YNH_APP_NEW_DOMAIN domain=$YNH_APP_NEW_DOMAIN
old_path=$(ynh_normalize_url_path $YNH_APP_OLD_PATH) old_path=$(ynh_normalize_url_path --path_url $YNH_APP_OLD_PATH)
path_url=$(ynh_normalize_url_path $YNH_APP_NEW_PATH) path_url=$(ynh_normalize_url_path --path_url $YNH_APP_NEW_PATH)
seahub_port=$(ynh_app_setting_get --app $app --key seahub_port) seahub_port=$(ynh_app_setting_get --app $app --key seahub_port)
fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port) fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_port)
webdav_port=$(ynh_app_setting_get --app $app --key webdav_port) webdav_port=$(ynh_app_setting_get --app $app --key webdav_port)

View file

@ -18,7 +18,7 @@ ynh_script_progression --message="Validating installation parameters..."
# Retrieve arguments # Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN 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" server_name="$YNH_APP_ARG_SERVER_NAME"
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_PUBLIC_SITE 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 # Find available ports
ynh_script_progression --message="Finding available ports..." ynh_script_progression --message="Finding available ports..."
seahub_port=$(ynh_find_port 8000) seahub_port=$(ynh_find_port --port 8000)
fileserver_port=$(ynh_find_port 8082) fileserver_port=$(ynh_find_port --port 8082)
webdav_port=$(ynh_find_port 8080) webdav_port=$(ynh_find_port --port 8080)
# store config in yunohost # store config in yunohost
ynh_script_progression --message="Storing installation settings..." ynh_script_progression --message="Storing installation settings..."
@ -200,7 +200,7 @@ fi
# Add logrotate # Add logrotate
ynh_script_progression --message="Configuring log rotation..." 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 ln -s $final_path/logs /var/log/seafile
# Add fail2ban # Add fail2ban

View file

@ -18,14 +18,14 @@ ynh_script_progression --message="Loading settings..."
# Retrieve arguments # Retrieve arguments
domain=$(ynh_app_setting_get --app $app --key domain) 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 seafile_data=/home/yunohost.app/seafile-data
db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd) db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd)
final_path=$(ynh_app_setting_get --app $app --key final_path) final_path=$(ynh_app_setting_get --app $app --key final_path)
seafile_user=$app seafile_user=$app
# Check domain/path availability # 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 # STANDARD RESTORATION STEPS
@ -37,7 +37,7 @@ ynh_restore
# Create user # Create user
ynh_script_progression --message="Configuring system 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 # Restore dependencies
ynh_script_progression --message="Reinstalling dependencies..." --weight=5 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 # Add logrotate
ynh_script_progression --message="Configuring log rotation..." 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 ln -s $final_path/logs /var/log/seafile
# Set all permissions # Set all permissions

View file

@ -18,7 +18,7 @@ ynh_script_progression --message="Loading installation settings..."
# Retrieve arguments # Retrieve arguments
domain=$(ynh_app_setting_get --app $app --key domain) 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) installed_version=$(ynh_app_setting_get --app $app --key installed_version)
seahub_port=$(ynh_app_setting_get --app $app --key seahub_port) seahub_port=$(ynh_app_setting_get --app $app --key seahub_port)
fileserver_port=$(ynh_app_setting_get --app $app --key fileserver_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 expect_scripts/upgrade_6.3.exp $final_path/seafile-server-$seafile_version $root_pwd
# Update logrotate to have the last version # 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."* ) "6.3."* )
# Update seafile by script # Update seafile by script
@ -227,7 +227,7 @@ set_permission
# Add logrotate # Add logrotate
ynh_script_progression --message="Configuring log rotation..." ynh_script_progression --message="Configuring log rotation..."
ynh_use_logrotate $final_path/logs --nonappend ynh_use_logrotate --logfile $final_path/logs --nonappend
# Add fail2ban # Add fail2ban
ynh_script_progression --message="Configuring fail2ban..." --weight=10 ynh_script_progression --message="Configuring fail2ban..." --weight=10