mirror of
https://github.com/YunoHost-Apps/shaarli_ynh.git
synced 2024-09-03 20:26:10 +02:00
Updated is_public according to YNH 3
This commit is contained in:
parent
c69790e6c2
commit
d861b1d6c1
3 changed files with 1 additions and 38 deletions
|
@ -1,36 +1,7 @@
|
||||||
#
|
|
||||||
# Common variables
|
|
||||||
#
|
|
||||||
|
|
||||||
# Shaarli version
|
|
||||||
VERSION="0.10.2"
|
|
||||||
|
|
||||||
# Download shaarli (dependencies included)
|
|
||||||
# Full Shaarli sources tarball URL
|
|
||||||
SHAARLI_SOURCE_URL=https://github.com/shaarli/Shaarli/releases/download/v${VERSION}/shaarli-v${VERSION}-full.tar.gz
|
|
||||||
|
|
||||||
# Full Shaarli sources tarball checksum
|
|
||||||
SHAARLI_SOURCE_SHA256="e8e804b5e85283d3f81798bb46b22b2395cc646e6f4411efdbc3477de4d51a41"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Common helpers
|
# Common helpers
|
||||||
#
|
#
|
||||||
|
|
||||||
# Source app helpers
|
|
||||||
. /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
# Add path
|
|
||||||
ynh_normalize_url_path () {
|
|
||||||
path_url=$1
|
|
||||||
test -n "$path_url" || ynh_die "ynh_normalize_url_path expect a URL path as first argument and received nothing."
|
|
||||||
if [ "${path_url:0:1}" != "/" ]; then # If the first character is not a /
|
|
||||||
path_url="/$path_url" # Add / at begin of path variable
|
|
||||||
fi
|
|
||||||
if [ "${path_url:${#path_url}-1}" == "/" ] && [ ${#path_url} -gt 1 ]; then # If the last character is a / and that not the only character.
|
|
||||||
path_url="${path_url:0:${#path_url}-1}" # Delete the last character
|
|
||||||
fi
|
|
||||||
echo $path_url
|
|
||||||
}
|
|
||||||
|
|
||||||
# Download and extract Shaarli sources to the given directory
|
# Download and extract Shaarli sources to the given directory
|
||||||
# usage: extract_shaarli DESTDIR [AS_USER]
|
# usage: extract_shaarli DESTDIR [AS_USER]
|
||||||
|
|
|
@ -118,14 +118,10 @@ chown -R $app: $final_path
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ $is_public -eq 0 ]
|
|
||||||
then # Remove the public access
|
|
||||||
ynh_app_setting_delete $app skipped_uris
|
|
||||||
fi
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
# unprotected_uris allows SSO credentials to be passed anyway
|
||||||
ynh_app_setting_set $app unprotected_uris "/"
|
ynh_app_setting_set $app unprotected_uris "/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -108,10 +108,6 @@ chown -R $app: $final_path
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ $is_public -eq 0 ]
|
|
||||||
then # Remove the public access
|
|
||||||
ynh_app_setting_delete $app skipped_uris
|
|
||||||
fi
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue