mirror of
https://github.com/YunoHost-Apps/streams_ynh.git
synced 2024-09-03 20:26:20 +02:00
Merge pull request #17 from YunoHost-Apps/21.02.11
Updated to latest version
This commit is contained in:
commit
d6876057e3
5 changed files with 102 additions and 31 deletions
|
@ -1,13 +1,16 @@
|
||||||
# ZAP for YunoHost
|
# ZAP for YunoHost
|
||||||
|
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/zap)  
|
[](https://dash.yunohost.org/appci/app/zap)  
|
||||||
[](https://install-app.yunohost.org/?app=zap)
|
[](https://install-app.yunohost.org/?app=zap)
|
||||||
|
|
||||||
> *This package allow you to install ZAP quickly and simply on a YunoHost server.
|
> *This package allow you to install ZAP quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
||||||
|
|
||||||
|
Version: 21.02.11
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
[Zap](https://zotlabs.com/zap/) is an an ethical alternative to Fediverse that provides powerful features for creating interconnected websites featuring a decentralized identity, communications, and permissions framework built using common webserver technology.
|
[Zap](https://zotlabs.com/zap/) is an an ethical alternative to Fediverse that provides powerful features for creating interconnected websites featuring a decentralized identity, communications, and permissions framework built using common webserver technology.
|
||||||
|
|
||||||
Compatible with **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** and many, many more.
|
Compatible with **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** and many, many more.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://codeberg.org/zot/zap/archive/2c9113a53a5aaa5b109a5f099bc012b48063b098.tar.gz
|
SOURCE_URL=https://codeberg.org/zot/zap/archive/4a62de088cc36027d6b1cb99c01eee12a18c3ce9.tar.gz
|
||||||
SOURCE_SUM=524a19ff9718c6d98d27f77be396e2300e85eb38eae26b03d6ef98da09a3967e
|
SOURCE_SUM=03ae2135792ce58823a44c216a75b14c0539fd9732d4520814db472405bdd6b0
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=
|
SOURCE_IN_SUBDIR=
|
||||||
SOURCE_FILENAME=
|
SOURCE_FILENAME=
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A fediverse server."
|
"en": "A fediverse server."
|
||||||
},
|
},
|
||||||
"version": "21.02.05~ynh1",
|
"version": "21.02.11~ynh1",
|
||||||
"url": "https://zotlabs.com/zap/",
|
"url": "https://zotlabs.com/zap/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -79,16 +79,43 @@ ynh_script_progression --message="Setting up Zap source files..."
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
git clone https://codeberg.org/zot/zap.git "$final_path"
|
||||||
|
|
||||||
|
|
||||||
# 2 - Zap Addons
|
# 2 - Zap Addons
|
||||||
|
|
||||||
# Make addon Directory and unpack the addons to this directory
|
# Make addon Directory and unpack the addons to this directory
|
||||||
ynh_script_progression --message="Create addon directory inside root folder..."
|
ynh_script_progression --message="Create addon directory inside root folder..."
|
||||||
mkdir $final_path/addon
|
|
||||||
ynh_script_progression --message="Setting up Zap addons source files..."
|
ynh_script_progression --message="Setting up Zap addons source files..."
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
|
pushd "$final_path"
|
||||||
|
mkdir -p extend/addon/zaddons
|
||||||
|
mkdir addon
|
||||||
|
git clone https://codeberg.org/zot/zap-addons.git $final_path/extend/addon/zaddons
|
||||||
|
filelist=(`ls extend/addon/zaddons`)
|
||||||
|
cd addon
|
||||||
|
for a in "${filelist[@]}" ; do
|
||||||
|
base=`basename $a`
|
||||||
|
if [ $base = '.git' ]; then
|
||||||
|
#echo 'ignoring git'
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
if [ ! -d ../extend/addon/zaddons/$base ]; then
|
||||||
|
#echo $a 'not a directory'
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
if [ -x $base ]; then
|
||||||
|
#echo $base 'file exists'
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo linking $base
|
||||||
|
|
||||||
|
ln -s ../extend/addon/zaddons/$base $base
|
||||||
|
done
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 3 - Some extra folders
|
# 3 - Some extra folders
|
||||||
|
|
|
@ -58,16 +58,11 @@ ynh_abort_if_errors
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Create a temporary directory
|
# Create a temporary directory
|
||||||
tmpdir="$(ynh_smart_mktemp 6000)"
|
|
||||||
# Backup the config file in the temp dir
|
|
||||||
cp -a "$final_path/.htconfig.php" "$tmpdir/.htconfig.php"
|
|
||||||
cp -a "$final_path/store" "$tmpdir/store"
|
|
||||||
cp -a "$final_path/php.log" "$tmpdir/php.log"
|
|
||||||
cp -a "$final_path/cache" "$tmpdir/cache"
|
|
||||||
|
|
||||||
|
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove "$final_path"
|
# ynh_secure_remove "$final_path"
|
||||||
|
|
||||||
# If final_path doesn't exist, create it
|
# If final_path doesn't exist, create it
|
||||||
if [ -z "$final_path" ]; then
|
if [ -z "$final_path" ]; then
|
||||||
|
@ -75,15 +70,8 @@ if [ -z "$final_path" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD UPGRADE STEPS
|
|
||||||
#=================================================
|
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
@ -93,16 +81,69 @@ ynh_setup_source --dest_dir="$final_path"
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
# ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
cp -a "$tmpdir/cache" "${final_path}"
|
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; then
|
||||||
cp -a "$tmpdir/store" "${final_path}"
|
pushd "$final_path"
|
||||||
cp -a "$tmpdir/.htconfig.php" "${final_path}"
|
git pull
|
||||||
cp -a "$tmpdir/php.log" "${final_path}"
|
cd extend/addon/zaddons
|
||||||
ynh_secure_remove --file="$tmpdir"
|
git pull
|
||||||
chmod -R 777 $final_path/store
|
cd ../../..
|
||||||
mkdir $final_path/addon
|
filelist=(`ls extend/addon/zaddons`)
|
||||||
ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
|
cd addon
|
||||||
|
for a in "${filelist[@]}" ; do
|
||||||
|
base=`basename $a`
|
||||||
|
if [ $base = '.git' ]; then
|
||||||
|
#echo 'ignoring git'
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
if [ ! -d ../extend/addon/zaddons/$base ]; then
|
||||||
|
#echo $a 'not a directory'
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
if [ -x $base ]; then
|
||||||
|
#echo $base 'file exists'
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo linking $base
|
||||||
|
|
||||||
|
ln -s ../extend/addon/zaddons/$base $base
|
||||||
|
done
|
||||||
|
for x in `ls` ; do
|
||||||
|
if [ -L "$x" ] && ! [ -e "$x" ]; then
|
||||||
|
echo "removing dead symlink $x" ;
|
||||||
|
rm -- "$x";
|
||||||
|
fi;
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
chmod -R 777 $final_path/store
|
||||||
|
else
|
||||||
|
|
||||||
|
# Create a temporary directory
|
||||||
|
tmpdir="$(ynh_smart_mktemp 6000)"
|
||||||
|
# Backup the config file in the temp dir
|
||||||
|
cp -a "$final_path/.htconfig.php" "$tmpdir/.htconfig.php"
|
||||||
|
cp -a "$final_path/store" "$tmpdir/store"
|
||||||
|
cp -a "$final_path/php.log" "$tmpdir/php.log"
|
||||||
|
cp -a "$final_path/cache" "$tmpdir/cache"
|
||||||
|
|
||||||
|
# Remove the app directory securely
|
||||||
|
ynh_secure_remove "$final_path"
|
||||||
|
|
||||||
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
|
cp -a "$tmpdir/cache" "${final_path}"
|
||||||
|
cp -a "$tmpdir/store" "${final_path}"
|
||||||
|
cp -a "$tmpdir/.htconfig.php" "${final_path}"
|
||||||
|
cp -a "$tmpdir/php.log" "${final_path}"
|
||||||
|
ynh_secure_remove --file="$tmpdir"
|
||||||
|
chmod -R 777 $final_path/store
|
||||||
|
mkdir $final_path/addon
|
||||||
|
ynh_setup_source --dest_dir="$final_path/addon" --source_id="app_addons"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
Loading…
Add table
Reference in a new issue