diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..e561e61 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -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. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..dd90a68 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -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**. diff --git a/manifest.json b/manifest.json index a4e0aac..1f48ac5 100644 --- a/manifest.json +++ b/manifest.json @@ -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": "" diff --git a/scripts/upgrade b/scripts/upgrade index 2c6a908..b654402 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 .*$" --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