diff --git a/README.md b/README.md index 27e311b..92f2d2d 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ Commento++ allows you to foster discussion on your website – if you have a blo - Moderation tools - Sticky comments - Thread locking -- OAuth login (Google, Github, Twitter) and single sign-on - Hot-reloading of comments - Email notifications. diff --git a/README_fr.md b/README_fr.md index 37e8ac9..9af738a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,6 @@ Commento++ allows you to foster discussion on your website – if you have a blo - Moderation tools - Sticky comments - Thread locking -- OAuth login (Google, Github, Twitter) and single sign-on - Hot-reloading of comments - Email notifications. diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 92c1438..0000000 --- a/conf/app.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/souramoo/commentoplusplus/releases/download/v1.8.7/release.tar.gz -SOURCE_SUM=a9925f34b3c035571b14b0d2f351129d70b9d589b9832fcb09f7f0d56d6d92a1 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 14b8db8..02871eb 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -9,6 +9,5 @@ Commento++ allows you to foster discussion on your website – if you have a blo - Moderation tools - Sticky comments - Thread locking -- OAuth login (Google, Github, Twitter) and single sign-on - Hot-reloading of comments - Email notifications. diff --git a/manifest.toml b/manifest.toml index 19b7e6d..f744872 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://docs.commento.io/" code = "https://github.com/souramoo/commentoplusplus" [integration] -yunohost = ">= 11.1.12" +yunohost = ">= 11.1.15" architectures = ["amd64"] multi_instance = true ldap = false @@ -44,6 +44,13 @@ ram.runtime = "50M" type = "password" [resources] + [resources.sources] + + [resources.sources.main] + url = "https://github.com/souramoo/commentoplusplus/releases/download/v1.8.7/release.tar.gz" + sha256 = "a9925f34b3c035571b14b0d2f351129d70b9d589b9832fcb09f7f0d56d6d92a1" + in_subdir = false + [resources.ports] [resources.system_user] diff --git a/scripts/install b/scripts/install index 2207465..fc82029 100755 --- a/scripts/install +++ b/scripts/install @@ -29,18 +29,22 @@ ynh_script_progression --message="Setting up source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="Privacy-focused commenting platform" --log="/var/log/$app/$app.log" + #================================================= # ADD A CONFIGURATION #================================================= @@ -51,21 +55,6 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/commento.en chmod 400 "$install_dir/commento.env" chown $app:$app "$install_dir/commento.env" -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Privacy-focused commenting platform" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/scripts/remove b/scripts/remove index 06fb827..4c29204 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,11 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE +# REMOVE SYSTEM CONFIGURATIONS #================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null @@ -22,19 +23,9 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config diff --git a/scripts/restore b/scripts/restore index ead1d23..178f67c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,15 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -36,33 +27,27 @@ ynh_script_progression --message="Restoring the PostgreSQL database..." --weight ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= -# RESTORE SYSTEMD +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Privacy-focused commenting platform" --log="/var/log/$app/$app.log" -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" - #================================================= # GENERIC FINALIZATION #================================================= -# RELOAD NGINX AND PHP-FPM +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index af55559..5cc3870 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,13 +50,18 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="Privacy-focused commenting platform" --log="/var/log/$app/$app.log" + #================================================= # UPDATE A CONFIG FILE #================================================= @@ -67,21 +72,6 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/commento.en chmod 400 "$install_dir/commento.env" chown $app:$app "$install_dir/commento.env" -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Privacy-focused commenting platform" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #=================================================