mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Apply last example_ynh
This commit is contained in:
parent
e6d9935af2
commit
8e9c387d70
10 changed files with 28 additions and 58 deletions
|
@ -17,15 +17,15 @@
|
|||
setup_public=1
|
||||
upgrade=1
|
||||
# 2.2.0~ynh1
|
||||
upgrade=1 from_commit=059ddc457aabe6962f5960612ed2dc1db53daeeb
|
||||
# upgrade=1 from_commit=059ddc457aabe6962f5960612ed2dc1db53daeeb
|
||||
# 2.2.2~ynh1
|
||||
upgrade=1 from_commit=63723f18af5b035a41e967078cc3128423b1f9ae
|
||||
# upgrade=1 from_commit=63723f18af5b035a41e967078cc3128423b1f9ae
|
||||
# 2.3.0~ynh1
|
||||
upgrade=1 from_commit=9f5c0970d2bf8bb6111785184b1d3762228b04ec
|
||||
# upgrade=1 from_commit=9f5c0970d2bf8bb6111785184b1d3762228b04ec
|
||||
# 2.3.0~ynh2
|
||||
upgrade=1 from_commit=4757df265b0c3e8d1fc5280190ccfe5705dcb691
|
||||
# upgrade=1 from_commit=4757df265b0c3e8d1fc5280190ccfe5705dcb691
|
||||
# 2.3.0~ynh3
|
||||
upgrade=1 from_commit=28ed2fd7ab7b5e55154991c990d8e780560a56db
|
||||
# upgrade=1 from_commit=28ed2fd7ab7b5e55154991c990d8e780560a56db
|
||||
# 2.4.0~ynh1
|
||||
upgrade=1 from_commit=2c4a57afdc92a6428ccfea3ccb74c7e33dc9b9ff
|
||||
backup_restore=1
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
location / {
|
||||
|
||||
# if you do not want remote frontends to be able to access your Pleroma backend
|
||||
# server, remove these lines.
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Standard nginx configuration
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
|
5
doc/DESCRIPTION.md
Normal file
5
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed.
|
||||
|
||||
For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post/what-is-pleroma/)
|
||||
|
||||
**Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web
|
|
@ -25,7 +25,7 @@
|
|||
"name": "yalh76"
|
||||
}],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.7.3"
|
||||
"yunohost": ">= 4.3.1.8"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
@ -35,13 +35,11 @@
|
|||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"example": "example.com"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"example": "johndoe"
|
||||
"type": "user"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
|
|
|
@ -73,7 +73,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
|
|||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/$app/config.exs"
|
||||
ynh_backup --src_path="/etc/$app/"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE POSTGRESQL DATABASE
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ynh_detect_arch__2
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -121,7 +120,7 @@ ynh_script_progression --message="Setting up source files..."
|
|||
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
architecture=$(ynh_detect_arch)
|
||||
architecture=$YNH_ARCH
|
||||
ynh_setup_source --dest_dir="$final_path/$app" --source_id=$architecture
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -170,11 +169,11 @@ chown -R $app:$app "$datadir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..."
|
||||
|
||||
mkdir -p /etc/$app
|
||||
chown -R $app /etc/$app
|
||||
|
||||
config="/etc/$app/config.exs"
|
||||
|
||||
mkdir -p /etc/$app
|
||||
chown $app:$app /etc/$app
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
|
@ -55,14 +55,6 @@ ynh_script_progression --message="Removing the PostgreSQL database..."
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..."
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -80,6 +72,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
|
|||
ynh_remove_nginx_config
|
||||
ynh_secure_remove --file="/etc/nginx/conf.d/$app-cache.conf"
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..."
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# CLOSE A PORT
|
||||
#=================================================
|
||||
|
|
|
@ -125,7 +125,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring various files..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/$app/config.exs"
|
||||
ynh_restore_file --origin_path="/etc/$app/"
|
||||
|
||||
chmod 400 "/etc/$app/config.exs"
|
||||
chown $app:$app "/etc/$app/config.exs"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
source _common.sh
|
||||
source ynh_package_version
|
||||
source ynh_detect_arch__2
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -184,7 +183,7 @@ then
|
|||
ynh_script_progression --message="Upgrading source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
architecture=$(ynh_detect_arch)
|
||||
architecture=$YNH_ARCH
|
||||
ynh_setup_source --dest_dir="$final_path/$app" --source_id=$architecture
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check the architecture
|
||||
#
|
||||
# example: architecture=$(ynh_detect_arch)
|
||||
#
|
||||
# usage: ynh_detect_arch
|
||||
#
|
||||
# Requires YunoHost version 2.2.4 or higher.
|
||||
|
||||
ynh_detect_arch(){
|
||||
local architecture
|
||||
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
|
||||
architecture="arm64"
|
||||
elif [ -n "$(uname -m | grep 64)" ]; then
|
||||
architecture="x86-64"
|
||||
elif [ -n "$(uname -m | grep 86)" ]; then
|
||||
architecture="i386"
|
||||
elif [ -n "$(uname -m | grep arm)" ]; then
|
||||
architecture="arm"
|
||||
else
|
||||
architecture="unknown"
|
||||
fi
|
||||
echo $architecture
|
||||
}
|
Loading…
Add table
Reference in a new issue