mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
update
This commit is contained in:
parent
5855b6e1f1
commit
047890be3b
5 changed files with 110 additions and 171 deletions
|
@ -12,8 +12,8 @@ domain=$(ynh_app_setting_get "$app" domain)
|
|||
|
||||
# definie useful vars
|
||||
parent_path=/var/www
|
||||
final_path=$parent_path/$app
|
||||
data_path=/home/yunohost.app/$app
|
||||
final_path="$parent_path"/"$app"
|
||||
data_path=/home/yunohost.app/"$app"
|
||||
|
||||
# backup sources & data
|
||||
ynh_backup "$final_path" "www"
|
||||
|
|
154
scripts/install
154
scripts/install
|
@ -6,71 +6,26 @@ set -eu
|
|||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
ynh_version=$(sudo yunohost -v | grep "moulinette:" | cut -d' ' -f2 | cut -d'.' -f1,2)
|
||||
|
||||
# retrieve arguments
|
||||
if [ $ynh_version = "2.4" ]; then
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path=$YNH_APP_ARG_PATH
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
language=$YNH_APP_ARG_LANGUAGE
|
||||
filesize=$YNH_APP_ARG_FILESIZE
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
else
|
||||
app=bozon
|
||||
domain=$1
|
||||
path=$2
|
||||
is_public=$3
|
||||
language=$4
|
||||
filesize=$5
|
||||
admin=$6
|
||||
password=$7
|
||||
fi
|
||||
|
||||
# Delete files and db if exit with an error
|
||||
EXIT_PROPERLY () {
|
||||
trap '' ERR
|
||||
echo -e "\e[91m \e[1m" # Shell in light red bold
|
||||
echo -e "!!\n $app install's script has encountered an error. Installation was cancelled.\n!!"
|
||||
|
||||
if [ $ynh_version = "2.2" ]; then
|
||||
/bin/bash ./remove # Appel le script remove. En 2.2, ce comportement n'est pas automatique.s
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
TRAP_ON () { # Activate signal capture
|
||||
trap EXIT_PROPERLY ERR # Capturing exit signals on error
|
||||
}
|
||||
TRAP_OFF () { # Ignoring signal capture until TRAP_ON
|
||||
# Pour une raison que j'ignore, la fonction TRAP_ON fonctionne très bien.
|
||||
# Mais pas la fonction TRAP_OFF...
|
||||
# Utiliser directement `trap '' ERR` dans le code pour l'utiliser, à la place de la fonction.
|
||||
trap '' ERR # Ignoring exit signals
|
||||
}
|
||||
TRAP_ON
|
||||
app=bozon
|
||||
domain=$1
|
||||
path=${2%/}
|
||||
is_public=$3
|
||||
language=$4
|
||||
filesize=$5
|
||||
admin=$6
|
||||
password=$7
|
||||
|
||||
# definie useful vars
|
||||
parent_path=/var/www
|
||||
final_path=$parent_path/$app
|
||||
data_path=/home/yunohost.app/$app
|
||||
|
||||
# remove trailing slash
|
||||
[ "$path" != "/" ] && path=${path%/}
|
||||
final_path="$parent_path"/"$app"
|
||||
data_path=/home/yunohost.app/"$app"
|
||||
|
||||
# check domain/path availability
|
||||
sudo yunohost app checkurl $domain$path -a $app
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
touch /force_stop
|
||||
fi
|
||||
sudo yunohost app checkurl "${domain}${path}" -a "$app" || ynh_die "The path ${domain}${path} is not available for app installation."
|
||||
|
||||
# check that admin user is an existing account
|
||||
sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
echo "Error : the chosen admin user does not exist"
|
||||
touch /force_stop
|
||||
fi
|
||||
ynh_user_exists "$admin" || ynh_die "The chosen admin user does not exist."
|
||||
|
||||
# add required packages
|
||||
ynh_package_install_from_equivs ../conf/${app}-deps.control || ynh_die "Unable to install dependencies"
|
||||
|
@ -79,75 +34,71 @@ ynh_package_install_from_equivs ../conf/${app}-deps.control || ynh_die "Unable t
|
|||
upstream_version=$(cat ../conf/upstream_version)
|
||||
|
||||
# save app settings
|
||||
sudo yunohost app setting $app admin_user -v "$admin"
|
||||
sudo yunohost app setting $app is_public -v "$is_public"
|
||||
sudo yunohost app setting $app domain -v "$domain"
|
||||
sudo yunohost app setting $app path -v "$path"
|
||||
sudo yunohost app setting $app version -v "$upstream_version"
|
||||
sudo yunohost app setting $app filesize -v "$filesize"
|
||||
ynh_app_setting_set "$app" admin_user "$admin"
|
||||
ynh_app_setting_set "$app" is_public "$is_public"
|
||||
ynh_app_setting_set "$app" domain "$domain"
|
||||
ynh_app_setting_set "$app" path "$path"
|
||||
ynh_app_setting_set "$app" version "$upstream_version"
|
||||
ynh_app_setting_set "$app" filesize "$filesize"
|
||||
|
||||
# download upstream_version version of bozon
|
||||
wget -nc --quiet https://github.com/broncowdd/BoZoN/archive/$upstream_version.zip -P /tmp
|
||||
sudo unzip -oq /tmp/$upstream_version.zip -d /tmp
|
||||
sudo mv /tmp/$upstream_version $parent_path/$app
|
||||
wget -nc --quiet https://github.com/broncowdd/BoZoN/archive/"$upstream_version".zip -P /tmp
|
||||
sudo unzip -oq /tmp/"$upstream_version".zip -d /tmp
|
||||
sudo mv /tmp/"$upstream_version" "$parent_path"/"$app"
|
||||
|
||||
# copy files to final folder and set permissions
|
||||
sudo find $final_path -type f -name ".htaccess" | xargs sudo rm
|
||||
sudo chown -R root: $final_path
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
sudo find "$final_path" -type f -name ".htaccess" | xargs sudo rm
|
||||
sudo chown -R root: "$final_path"
|
||||
sudo find "$final_path" -type f | xargs sudo chmod 644
|
||||
sudo find "$final_path" -type d | xargs sudo chmod 755
|
||||
|
||||
# configure config file
|
||||
sudo sed -i "s@languageuage='en';@languageuage='$language';@g" $final_path/config.php
|
||||
|
||||
# create data folders
|
||||
sudo mkdir -p $final_path/private
|
||||
sudo mkdir -p $data_path/uploads
|
||||
sudo ln -s $data_path/uploads $final_path/uploads
|
||||
sudo mkdir -p $data_path/thumbs
|
||||
sudo ln -s $data_path/thumbs $final_path/thumbs
|
||||
sudo chown -R www-data: $final_path/private
|
||||
sudo chown -R www-data: $data_path/uploads
|
||||
sudo chown -R www-data: $data_path/thumbs
|
||||
sudo mkdir -p "$final_path"/private
|
||||
sudo mkdir -p "$data_path"/uploads
|
||||
sudo ln -s "$data_path"/uploads "$final_path"/uploads
|
||||
sudo mkdir -p "$data_path"/thumbs
|
||||
sudo ln -s "$data_path"/thumbs "$final_path"/thumbs
|
||||
sudo chown -R www-data: "$final_path"/private
|
||||
sudo chown -R www-data: "$data_path"/uploads
|
||||
sudo chown -R www-data: "$data_path"/thumbs
|
||||
|
||||
# configure nginx settings
|
||||
## path
|
||||
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_ALIAS@$final_path@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_APP@${app}@g" ../conf/nginx.conf
|
||||
## file upload size limit
|
||||
sudo sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/nginx.conf
|
||||
## copy final
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
sed -i "s@YNH_EXAMPLE_PATH@${path}@g" ../conf/nginx.conf
|
||||
sed -i "s@YNH_EXAMPLE_ALIAS@${final_path}@g" ../conf/nginx.conf
|
||||
sed -i "s@YNH_EXAMPLE_APP@${app}@g" ../conf/nginx.conf
|
||||
sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf "$nginx_conf"
|
||||
|
||||
# copy and set php-fpm configuration
|
||||
## path
|
||||
postsize=${filesize%?}.1${filesize: -1}
|
||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||
sed -i "s@YNH_EXAMPLE_APP@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@YNH_EXAMPLE_ALIAS@${final_path}@g" ../conf/php-fpm.conf
|
||||
## file upload size limit
|
||||
sudo sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/php-fpm.conf
|
||||
postsize=${filesize%?}.1${filesize: -1}
|
||||
sudo sed -i "s@YNH_POST_SIZE@${postsize}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@YNH_POST_SIZE@${postsize}@g" ../conf/php-fpm.conf
|
||||
## copy final and set permissions
|
||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||
sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
|
||||
sudo chown root: $phpfpm_conf
|
||||
sudo chmod 644 $phpfpm_conf
|
||||
sudo chown root: "$phpfpm_conf"
|
||||
sudo chmod 644 "$phpfpm_conf"
|
||||
|
||||
# create the superadmin
|
||||
## set temporary public access
|
||||
sudo yunohost app setting $app unprotected_uris -v "/"
|
||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||
## start app
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
||||
## fill the superadmin creation form
|
||||
curl_path=$([ "$path" == "/" ] || echo $path)
|
||||
curl_path=$([ "$path" == "/" ] || echo "$path")
|
||||
curl -k -X POST \
|
||||
--data-urlencode creation="1" \
|
||||
--data-urlencode login="$admin" \
|
||||
--data-urlencode pass="$password" \
|
||||
--data-urlencode confirm="$password" \
|
||||
https://$domain$curl_path/index.php?p=admin > /dev/null 2>&1
|
||||
https://"$domain""$curl_path"/index.php?p=admin > /dev/null 2>&1
|
||||
|
||||
# if app is private, remove url to SSOWat conf from skipped_uris
|
||||
if [ "$is_public" = "No" ];
|
||||
|
@ -156,8 +107,13 @@ then
|
|||
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
pathluaregex=$(echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
# redirect to SSOwat login in
|
||||
sudo yunohost app setting $app unprotected_uris -d
|
||||
sudo yunohost app setting $app unprotected_regex -v "$domainluaregex$pathluaregex/index.php%?f=.+$","$domainluaregex$pathluaregex/index.php%?zipfolder=.+$","$domainluaregex$pathluaregex/private/temp/.+%.zip$","$domainluaregex$pathluaregex/core/js/.*$","$domainluaregex$pathluaregex/templates/.*$"
|
||||
ynh_app_setting_delete "$app" unprotected_uris
|
||||
ynh_app_setting_set "$app" unprotected_regex \
|
||||
"${domainluaregex}${pathluaregex}/index.php%?f=.+$", \
|
||||
"${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$", \
|
||||
"${domainluaregex}${pathluaregex}/private/temp/.+%.zip$", \
|
||||
"${domainluaregex}${pathluaregex}/core/js/.*$", \
|
||||
"${domainluaregex}${pathluaregex}/templates/.*$"
|
||||
fi
|
||||
|
||||
# restart services
|
||||
|
|
|
@ -6,33 +6,25 @@ set -eu
|
|||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
ynh_version=$(sudo yunohost -v | grep "moulinette:" | cut -d' ' -f2 | cut -d'.' -f1,2)
|
||||
|
||||
#retrieve arguments
|
||||
if [ $ynh_version = "2.4" ]; then
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
# Source app helpers
|
||||
. /usr/share/yunohost/helpers
|
||||
else
|
||||
app=bozon
|
||||
fi
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$(ynh_app_setting_get "${app}" domain)
|
||||
|
||||
if [ -e "/var/www/$app" ]; then
|
||||
if [ -e "/var/www/${app}" ]; then
|
||||
echo "Delete app"
|
||||
sudo rm -rf /var/www/$app
|
||||
sudo rm -rf /var/www/${app}
|
||||
fi
|
||||
if [ -e "/etc/nginx/conf.d/$domain.d/$app.conf" ]; then
|
||||
if [ -e "/etc/nginx/conf.d/${domain}.d/${app}.conf" ]; then
|
||||
echo "Delete Nginx config"
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
sudo rm -f /etc/nginx/conf.d/${domain}.d/${app}.conf
|
||||
fi
|
||||
if [ -e "/etc/php5/fpm/pool.d/$app.conf" ]; then
|
||||
if [ -e "/etc/php5/fpm/pool.d/${app}.conf" ]; then
|
||||
echo "Delete fpm config"
|
||||
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
||||
sudo rm -f /etc/php5/fpm/pool.d/${app}.conf
|
||||
fi
|
||||
if [ -e "/home/yunohost.app/$app" ]; then
|
||||
if [ -e "/home/yunohost.app/${app}" ]; then
|
||||
echo "Delete datas"
|
||||
sudo rm -rf /home/yunohost.app/$app
|
||||
sudo rm -rf /home/yunohost.app/${app}
|
||||
fi
|
||||
|
||||
# Remove app dependencies
|
||||
|
@ -42,5 +34,3 @@ ynh_package_autoremove "${app}-deps" || true
|
|||
sudo service php5-fpm restart || true
|
||||
sudo service nginx restart || true
|
||||
sudo yunohost app ssowatconf
|
||||
|
||||
echo -e "\e[0m"
|
||||
|
|
|
@ -12,8 +12,8 @@ domain=$(ynh_app_setting_get "$app" domain)
|
|||
|
||||
# definie useful vars
|
||||
parent_path=/var/www
|
||||
final_path=$parent_path/$app
|
||||
data_path=/home/yunohost.app/$app
|
||||
final_path="$parent_path"/"$app"
|
||||
data_path=/home/yunohost.app/"$app"
|
||||
nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||
|
||||
|
@ -46,12 +46,12 @@ sudo mkdir -p "$data_path"
|
|||
sudo cp -a ./data/. "$data_path"
|
||||
|
||||
# restore permissions
|
||||
sudo chown -R root: $final_path
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
sudo chown -R www-data: $final_path/private
|
||||
sudo chown -R www-data: $data_path/uploads
|
||||
sudo chown -R www-data: $data_path/thumbs
|
||||
sudo chown -R root: "$final_path"
|
||||
sudo find "$final_path" -type f | xargs sudo chmod 644
|
||||
sudo find "$final_path" -type d | xargs sudo chmod 755
|
||||
sudo chown -R www-data: "$final_path"/private
|
||||
sudo chown -R www-data: "$data_path"/uploads
|
||||
sudo chown -R www-data: "$data_path"/thumbs
|
||||
|
||||
# restore Nginx & php-fpm
|
||||
sudo cp -a ./conf/nginx.conf "$nginx_conf"
|
||||
|
|
|
@ -6,68 +6,56 @@ set -eu
|
|||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
ynh_version=$(sudo yunohost -v | grep "moulinette:" | cut -d' ' -f2 | cut -d'.' -f1,2)
|
||||
|
||||
# retrieve arguments
|
||||
if [ $ynh_version = "2.4" ]; then
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
else
|
||||
app=bozon
|
||||
fi
|
||||
path=$(sudo yunohost app setting $app path)
|
||||
upstream_version=$(sudo yunohost app setting $app version)
|
||||
is_public=$(sudo yunohost app setting $app is_public)
|
||||
filesize=$(sudo yunohost app setting $app filesize)
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
if [ "${#filesize}" -eq 0 ]
|
||||
then # in old script filesize was not saved as an setting
|
||||
filesize=$(cat /etc/nginx/conf.d/$domain.d/$app.conf | grep -Po 'client_max_body_size \K.*(?=;)')
|
||||
sudo yunohost app setting $app filesize -v "$filesize"
|
||||
fi
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
path=$(ynh_app_setting_get "$app" path)
|
||||
is_public=$(ynh_app_setting_get "$app" is_public)
|
||||
filesize=$(ynh_app_setting_get "$app" filesize)
|
||||
|
||||
# definie useful vars
|
||||
parent_path=/var/www
|
||||
data_path=/home/yunohost.app/$app
|
||||
final_path=$parent_path/$app
|
||||
data_path=/home/yunohost.app/"$app"
|
||||
final_path=$parent_path/"$app"
|
||||
if [ ${filesize} -eq 0 ]
|
||||
then # in old script filesize was not saved as an setting
|
||||
filesize=$(cat /etc/nginx/conf.d/"$domain".d/"$app".conf | grep -Po 'client_max_body_size \K.*(?=;)')
|
||||
ynh_app_setting_set "$app" filesize "$filesize"
|
||||
fi
|
||||
|
||||
# add required packages
|
||||
ynh_package_install_from_equivs ../conf/${app}-deps.control || ynh_die "Unable to install dependencies"
|
||||
ynh_package_install_from_equivs ../conf/"$app"-deps.control || ynh_die "Unable to install dependencies"
|
||||
|
||||
# retrieve upstream_version version of bozon
|
||||
upstream_version=$(cat ../conf/upstream_version)
|
||||
|
||||
# save app settings
|
||||
sudo yunohost app setting $app version -v "$upstream_version"
|
||||
ynh_app_setting_set "$app" version "$upstream_version"
|
||||
|
||||
# download upstream_version version of bozon
|
||||
wget -nc --quiet https://github.com/broncowdd/BoZoN/archive/$upstream_version.zip -P /tmp
|
||||
sudo unzip -oq /tmp/$upstream_version.zip -d /tmp
|
||||
sudo rsync -avz --exclude="config.php" --exclude=".htaccess" /tmp/$upstream_version/* $final_path
|
||||
wget -nc --quiet https://github.com/broncowdd/BoZoN/archive/"$upstream_version".zip -P /tmp
|
||||
sudo unzip -oq /tmp/"$upstream_version".zip -d /tmp
|
||||
sudo rsync -avz --exclude="config.php" --exclude=".htaccess" /tmp/"$upstream_version"/* "$final_path"
|
||||
|
||||
# configure nginx settings
|
||||
## path
|
||||
folder_path=${path%/}
|
||||
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_ALIAS@$final_path@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_APP@${app}@g" ../conf/nginx.conf
|
||||
## file upload size limit
|
||||
sudo sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/nginx.conf
|
||||
## copy final
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
sed -i "s@YNH_EXAMPLE_PATH@${path}@g" ../conf/nginx.conf
|
||||
sed -i "s@YNH_EXAMPLE_ALIAS@${final_path}@g" ../conf/nginx.conf
|
||||
sed -i "s@YNH_EXAMPLE_APP@${app}@g" ../conf/nginx.conf
|
||||
sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf "$nginx_conf"
|
||||
|
||||
# copy and set php-fpm configuration
|
||||
## path
|
||||
postsize=${filesize%?}.1${filesize: -1}
|
||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||
sed -i "s@YNH_EXAMPLE_APP@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@YNH_EXAMPLE_ALIAS@${final_path}@g" ../conf/php-fpm.conf
|
||||
## file upload size limit
|
||||
sudo sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/php-fpm.conf
|
||||
postsize=${filesize%?}.1${filesize: -1}
|
||||
sed -i "s@YNH_FILE_SIZE@${filesize}@g" ../conf/php-fpm.conf
|
||||
sudo sed -i "s@YNH_POST_SIZE@${postsize}@g" ../conf/php-fpm.conf
|
||||
## copy final and set permissions
|
||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||
sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
|
||||
sudo chown root: $phpfpm_conf
|
||||
sudo chmod 644 $phpfpm_conf
|
||||
sudo chown root: "$phpfpm_conf"
|
||||
sudo chmod 644 "$phpfpm_conf"
|
||||
|
||||
# if app is private, remove url to SSOWat conf from skipped_uris
|
||||
if [ "$is_public" = "No" ];
|
||||
|
@ -76,8 +64,13 @@ then
|
|||
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
pathluaregex=$(echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
# redirect to SSOwat login in
|
||||
sudo yunohost app setting $app unprotected_uris -d
|
||||
sudo yunohost app setting $app unprotected_regex -v "$domainluaregex$pathluaregex/index.php%?f=.+$","$domainluaregex$pathluaregex/index.php%?zipfolder=.+$","$domainluaregex$pathluaregex/private/temp/.+%.zip$","$domainluaregex$pathluaregex/core/js/.*$","$domainluaregex$pathluaregex/templates/.*$"
|
||||
ynh_app_setting_delete "$app" unprotected_uris
|
||||
ynh_app_setting_set "$app" unprotected_regex \
|
||||
"${domainluaregex}${pathluaregex}/index.php%?f=.+$", \
|
||||
"${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$", \
|
||||
"${domainluaregex}${pathluaregex}/private/temp/.+%.zip$", \
|
||||
"${domainluaregex}${pathluaregex}/core/js/.*$", \
|
||||
"${domainluaregex}${pathluaregex}/templates/.*$"
|
||||
fi
|
||||
|
||||
# Restart services
|
||||
|
|
Loading…
Reference in a new issue