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:
parent
2abcb97c5f
commit
476b92778d
2 changed files with 7 additions and 7 deletions
|
@ -42,7 +42,7 @@ ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4
|
||||||
|
|
||||||
pushd "$install_dir"
|
pushd "$install_dir"
|
||||||
./smp-server init --no-password --ip $public_ip4 --store-log --yes
|
./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
|
popd
|
||||||
|
|
||||||
fingerprint=$(cat /etc/opt/simplex/fingerprint)
|
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_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"
|
chmod 400 "/etc/opt/simplex-xftp/file-server.ini"
|
||||||
chown $app:$app "/etc/opt/simplex-xftp/file-server.ini"
|
chown $app:$app "/etc/opt/simplex-xftp/file-server.ini"
|
||||||
|
|
|
@ -24,10 +24,10 @@ ynh_systemd_action --service_name=xftp --action="stop" --log_path="systemd"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
#if [ -z "${storage_quota:-}" ]; then
|
if [ -z "${storage_quota:-}" ]; then
|
||||||
# storage_quota="20gb"
|
storage_quota="20gb"
|
||||||
# ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota
|
ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# 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
|
ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4
|
||||||
|
|
||||||
pushd "$install_dir"
|
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
|
popd
|
||||||
|
|
||||||
xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint)
|
xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint)
|
||||||
|
|
Loading…
Add table
Reference in a new issue