mirror of
https://github.com/YunoHost-Apps/simplex_ynh.git
synced 2024-09-03 20:26:28 +02:00
fix
This commit is contained in:
parent
8ffa1c1076
commit
c0009a1d2a
2 changed files with 15 additions and 22 deletions
|
@ -13,8 +13,8 @@ source /usr/share/yunohost/helpers
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -45,13 +45,13 @@ pushd "$install_dir"
|
||||||
./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir
|
./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#fingerprint=$(cat /etc/opt/simplex/fingerprint)
|
fingerprint=$(cat /etc/opt/simplex/fingerprint)
|
||||||
#ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint
|
ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint
|
||||||
|
|
||||||
#xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint)
|
xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint)
|
||||||
#ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint
|
ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint
|
||||||
|
|
||||||
#ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini"
|
ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini"
|
||||||
|
|
||||||
chown -R $app:$app "/etc/opt/simplex"
|
chown -R $app:$app "/etc/opt/simplex"
|
||||||
chown -R $app:$app "/etc/opt/simplex-xftp"
|
chown -R $app:$app "/etc/opt/simplex-xftp"
|
||||||
|
@ -59,12 +59,12 @@ chown -R $app:$app "/etc/opt/simplex-xftp"
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
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="../conf/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"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
@ -87,13 +87,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
ynh_systemd_action --service_name="xftp" --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name="xftp" --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
|
||||||
fingerprint=$(cat /etc/opt/simplex/fingerprint)
|
|
||||||
ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint
|
|
||||||
|
|
||||||
xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint)
|
|
||||||
ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -41,10 +41,10 @@ ynh_systemd_action --service_name=xftp --action="stop" --log_path="/var/log/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue