1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streams_ynh.git synced 2024-09-03 20:26:20 +02:00
This commit is contained in:
ericgaspar 2021-09-06 08:13:52 +02:00
parent 33938d9f5f
commit 0b0d3abd4b
4 changed files with 54 additions and 13 deletions

13
doc/DESCRIPTION.md Normal file
View file

@ -0,0 +1,13 @@
[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.
## Unique Features of ZAP
- **Groups** : public, private, and moderated.
- **Events** : Calendar and attendance; automatic birthday notifications for friends using this feature.
- **Cloud**storage : Built-in network file storage integrated with social networking access.
- **Editor** : Supports both markdown and bbcode. Use either or both - if you want.
- **Share**: Drag-and-drop a number of different things such as files, photos, webpages, maps, phone numbers to share- them.
- **Lists**: Sometimes referred to as circles or aspects, this lets you define your own groups of related friends and- communicate with them as a private group.
- **Extend** : Change or upgrade your software functionality as desired by installing additional features from addons and- the free app collection.

19
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,19 @@
## Installation
Before installing, read the [Zap installation instructions](https://codeberg.org/zot/zap/src/branch/release/install/INSTALL.txt) for important information about:
### Register a new domain and add it to YunoHost
- Zap requires a dedicated domain, so obtain one and add it using the YunoHost admin panel. **Domains -> Add domain**. As Zap uses the full domain and is installed on the root, you can create a subdomain such as Zap.domain.tld. Don't forget to update your DNS if you manage them manually.
## Ldap Admin user rights, logs and failed database updates
- **For admin rights**: When installation is complete, you will need to visit your new hub's page and login with the **admin account username** which was entered at the time of installation process. You should then be able to create your first channel and have the **admin rights** for the hub.
- **For normal YunoHost users :** Normal LDAP users can login through Ldap authentication and create there channels.
- **Failing to get admin rights :** If the admin cannot access the admin settings at `https://zap.example.com/admin` or you want to grant admin rights to any other user(s) on the hub, then you have to **manually add 4096** to the **account_roles** under **accounts** for that user in the **database through phpMYAdmin**.
- **For logs :** Go to **admin->logs** and enter the file name **php.log**.
- **Failed Database after Upgrade :** Some times databse upgrade fails after version upgrade. You can go to hub eg. `https://zap.example.com/admin/dbsync/` and check the numbers of failled update. These updates will have to be ran manually by **phpMYAdmin**.

View file

@ -7,6 +7,11 @@
},
"version": "21.10.21~ynh1",
"url": "https://zotlabs.com/zap/",
"upstream": {
"license": "MIT",
"website": "https://zotlabs.com/zap/",
"code": "https://codeberg.org/zot/zap"
},
"license": "MIT",
"maintainer": {
"name": ""

View file

@ -78,6 +78,14 @@ if [ -z "$final_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -157,13 +165,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
# Set right permissions for curl install
chown -R $app: $final_path
@ -190,18 +191,21 @@ ynh_script_progression --message="Upgrading logrotate configuration..."
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#=================================================
# UPGRADE FAIL2BAN
#=================================================
ynh_script_progression --message="Re-configure Fail2Ban..."
ynh_add_fail2ban_config --logpath="$final_path/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP <HOST>.*$" --max_retry="5"
# Set cron job
ynh_print_info "Setting up cron job..."
ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$final_path" --target_file="../conf/poller-cron"
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="../conf/poller-cron"
ynh_replace_string --match_string="__PHP_VERSION__" --replace_string="$phpversion" --target_file="../conf/poller-cron"
cp -f ../conf/poller-cron /etc/cron.d/$app
#=================================================
# UPGRADE CRON
#=================================================
ynh_script_progression --message="Setting up cron job..."
ynh_add_config --template="../conf/poller-cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#=================================================
# UPGRADE DEPENDENCIES