mirror of
https://github.com/YunoHost-Apps/epicyon_ynh.git
synced 2024-09-03 18:36:08 +02:00
Upgrade to 2022.08.02~ynh1
This commit is contained in:
parent
b4fa116269
commit
1f69303951
12 changed files with 36 additions and 41 deletions
|
@ -11,7 +11,8 @@
|
||||||
setup_private=0
|
setup_private=0
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
# upgrade=1 from_commit=CommitHash
|
# 20.01.2022~ynh1
|
||||||
|
upgrade=1 from_commit=52c1e2d4fbf5221e32025bc28939b93a64622031
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=1
|
port_already_use=1
|
||||||
|
@ -19,7 +20,3 @@
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
|
||||||
; commit=CommitHash
|
|
||||||
name=Name and date of the commit.
|
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
SOURCE_URL=https://gitlab.com/bashrc2/epicyon/-/archive/18088169e682c05cba03349e01e759981396222f/epicyon-18088169e682c05cba03349e01e759981396222f.tar.gz
|
SOURCE_URL=https://gitlab.com/bashrc2/epicyon/-/archive/9d7856f9c0434b1587ae90ce19739ece6db6c206/epicyon-9d7856f9c0434b1587ae90ce19739ece6db6c206.tar.gz
|
||||||
SOURCE_SUM=a560c52d49a22efd75a9c5006d695765f1a29ad70718fc50a0b26fcbcf640e0c
|
SOURCE_SUM=6171f537792b67fff24eaf495ea791dd7d153739990764d8be8d09722b03291c
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
SOURCE_FILENAME=
|
||||||
SOURCE_EXTRACT=true
|
SOURCE_EXTRACT=true
|
||||||
|
|
|
@ -7,7 +7,7 @@ Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=/usr/bin/python3 __FINALPATH__/epicyon.py --port 443 --proxy __PORT__ --domain __DOMAIN__ --registration close --debug
|
ExecStart=/usr/bin/python3 __FINALPATH__/epicyon.py --port 443 --proxy __PORT__ --domain __DOMAIN__ --registration open --log_login_failures
|
||||||
Environment=USER=__APP__
|
Environment=USER=__APP__
|
||||||
Environment=PYTHONUNBUFFERED=true
|
Environment=PYTHONUNBUFFERED=true
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ActivityPub server implementing S2S and C2S protocols, suitable for single board computers. Includes features such as moderation tools, post expiry, content warnings, and image descriptions
|
1
doc/DESCRIPTION_fr.md
Normal file
1
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Serveur ActivityPub mettant en œuvre les protocoles S2S et C2S, adapté aux ordinateurs monocartes. Comprend des fonctionnalités telles que des outils de modération, l'expiration des messages, des avertissements sur le contenu et des descriptions d'images.
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Federated social network server",
|
"en": "Federated social network server",
|
||||||
"fr": "Serveur de réseau social fédéré"
|
"fr": "Serveur de réseau social fédéré"
|
||||||
},
|
},
|
||||||
"version": "20.01.2022~ynh1",
|
"version": "2022.08.02~ynh1",
|
||||||
"url": "https://epicyon.net/",
|
"url": "https://epicyon.net/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-1.0-or-later",
|
"license": "AGPL-1.0-or-later",
|
||||||
|
|
|
@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
true
|
ynh_clean_check_starting
|
||||||
}
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
@ -26,11 +26,12 @@ ynh_abort_if_errors
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url="/"
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
email=$(ynh_user_get_info $admin 'mail')
|
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
email=$(ynh_user_get_info --username=$admin --key="mail")
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -61,7 +62,7 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_script_progression --message="Finding an available port..." --weight=1
|
ynh_script_progression --message="Finding an available port..." --weight=1
|
||||||
|
|
||||||
# Find an available port
|
# Find an available port
|
||||||
port=$(ynh_find_port --port=7156)
|
port=$(ynh_find_port --port=8095)
|
||||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -86,9 +87,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
|
ynh_app_setting_set --app=$app --key=public_path --value=$public_path
|
||||||
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
# Clone repo, create public path and link accounts
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
git clone https://gitlab.com/bashrc2/epicyon $final_path --quiet
|
|
||||||
|
|
||||||
mkdir $public_path
|
mkdir $public_path
|
||||||
mkdir -p $final_path/accounts/newsmirror
|
mkdir -p $final_path/accounts/newsmirror
|
||||||
|
@ -113,9 +113,9 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
# ...
|
# CREATE ADMIN USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Create admin user" --weight=1
|
ynh_script_progression --message="Creating admin user" --weight=1
|
||||||
|
|
||||||
# Create admin
|
# Create admin
|
||||||
python3 $final_path/epicyon.py --addaccount=$admin --password=$password --domain=$domain
|
python3 $final_path/epicyon.py --addaccount=$admin --password=$password --domain=$domain
|
||||||
|
|
|
@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
true
|
ynh_clean_check_starting
|
||||||
}
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
@ -42,13 +42,6 @@ test ! -d $final_path \
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
#=================================================
|
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -86,6 +79,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -37,6 +37,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
|
ynh_clean_check_starting
|
||||||
# Restore it if the upgrade fails
|
# Restore it if the upgrade fails
|
||||||
ynh_restore_upgradebackup
|
ynh_restore_upgradebackup
|
||||||
}
|
}
|
||||||
|
@ -68,10 +69,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Pull the latest sorce
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
pushd "$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
git pull --quiet
|
|
||||||
popd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
@ -79,6 +78,13 @@ chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chown -R $app: $public_path
|
chown -R $app: $public_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -87,13 +93,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
2
sources/extra_files/app/.gitignore
vendored
2
sources/extra_files/app/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
2
sources/patches/.gitignore
vendored
2
sources/patches/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
Loading…
Reference in a new issue