1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/simplex_ynh.git synced 2024-09-03 20:26:28 +02:00

add quota

This commit is contained in:
Éric Gaspar 2024-05-08 14:22:51 +02:00
parent 2abcb97c5f
commit 476b92778d
2 changed files with 7 additions and 7 deletions

View file

@ -42,7 +42,7 @@ ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4
pushd "$install_dir"
./smp-server init --no-password --ip $public_ip4 --store-log --yes
./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir
./xftp-server init --ip $public_ip4 --quota '$storage_quota' --store-log --path $data_dir
popd
fingerprint=$(cat /etc/opt/simplex/fingerprint)
@ -61,7 +61,7 @@ ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini"
ynh_add_config --template="file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini"
chmod 400 "/etc/opt/simplex-xftp/file-server.ini"
chown $app:$app "/etc/opt/simplex-xftp/file-server.ini"

View file

@ -24,10 +24,10 @@ ynh_systemd_action --service_name=xftp --action="stop" --log_path="systemd"
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
#if [ -z "${storage_quota:-}" ]; then
# storage_quota="20gb"
# ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota
#fi
if [ -z "${storage_quota:-}" ]; then
storage_quota="20gb"
ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -55,7 +55,7 @@ if [ ! -d /etc/opt/simplex-xftp ]; then
ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4
pushd "$install_dir"
./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir
./xftp-server init --ip $public_ip4 --quota '$storage_quota' --store-log --path $data_dir
popd
xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint)