mirror of
https://github.com/YunoHost-Apps/commento_ynh.git
synced 2024-09-03 18:16:16 +02:00
commit
787bbae8e7
9 changed files with 35 additions and 81 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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.
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue