|
|
|
@ -1,19 +1,22 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# Source app helpers
|
|
|
|
|
. /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
|
|
# Retrieve arguments
|
|
|
|
|
domain=$(sudo ynh_app_setting_get ffsync domain)
|
|
|
|
|
path=$(sudo ynh_app_setting_get ffsync path)
|
|
|
|
|
db_pwd=$(sudo ynh_app_setting_get ffsync mysqlpwd)
|
|
|
|
|
domain=$(ynh_app_setting_get ffsync domain)
|
|
|
|
|
path=$(ynh_app_setting_get ffsync path)
|
|
|
|
|
db_pwd=$(ynh_app_setting_get ffsync mysqlpwd)
|
|
|
|
|
db_user=ffsync
|
|
|
|
|
final_path=/opt/yunohost/ffsync
|
|
|
|
|
|
|
|
|
|
# Get secret variable
|
|
|
|
|
secret=$(sudo ynh_app_setting_get ffsync secret)
|
|
|
|
|
secret=$(ynh_app_setting_get ffsync secret)
|
|
|
|
|
# Get from conf file if not defined
|
|
|
|
|
if [[ -z $secret ]]
|
|
|
|
|
then
|
|
|
|
|
secret=$(sudo grep "secret =" $final_path/syncserver.ini | cut -d" " -f3)
|
|
|
|
|
sudo ynh_app_setting_set ffsync secret $secret
|
|
|
|
|
ynh_app_setting_set ffsync secret $secret
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Check Swap
|
|
|
|
@ -81,5 +84,5 @@ sudo service ffsync restart
|
|
|
|
|
|
|
|
|
|
# Reload Nginx and regenerate SSOwat conf
|
|
|
|
|
sudo service nginx reload
|
|
|
|
|
sudo ynh_app_setting_set ffsync skipped_uris "/"
|
|
|
|
|
ynh_app_setting_set ffsync skipped_uris "/"
|
|
|
|
|
sudo yunohost app ssowatconf
|
|
|
|
|