1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lstu_ynh.git synced 2024-09-03 19:36:12 +02:00

Merge pull request #51 from YunoHost-Apps/enh-testing

Enh testing
This commit is contained in:
Éric Gaspar 2020-12-18 12:48:24 +01:00 committed by GitHub
commit 04b80f2cef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 29 additions and 25 deletions

BIN
LSTU_screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View file

@ -7,13 +7,13 @@
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## Overview
Lstu means Let's Shorten That Url. Lstu means Let's Shorten That URL.
**Shipped version:** 0.22-0 **Shipped version:** 0.22-0
## Screenshots ## Screenshots
![](https://framalibre.org/sites/default/files/Screenshot_20161213_120016_1.png) ![](LSTU_screenshot.png)
## Demo ## Demo

View file

@ -8,14 +8,16 @@
0 0
], ],
"description": { "description": {
"en": "Change the public access of the app." "en": "Change the public access of the app.",
"fr": "Modifiez l'accès public de l'application."
}, },
"arguments": [ "arguments": [
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": { "ask": {
"en": "Is it a public app ?" "en": "Is it a public app?",
"fr": "Est-ce une application publique ?"
}, },
"default": true "default": true
} }

View file

@ -4,7 +4,9 @@ Documentation=https://framagit.org/luc/lstu
[Service] [Service]
Type=forking Type=forking
User=www-data User=__APP__
Restart=always
RestartSec=10
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
ExecStart=/usr/bin/carton exec script/application minion worker ExecStart=/usr/bin/carton exec script/application minion worker

View file

@ -6,7 +6,7 @@ After=network.target
[Service] [Service]
Type=forking Type=forking
User=www-data User=__APP__
Restart=always Restart=always
RestartSec=10 RestartSec=10
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__

View file

@ -7,7 +7,7 @@ about: Create a report to help us debug, it would be nice to fill the template a
**How to post a meaningful bug report** **How to post a meaningful bug report**
1. *Read this whole template first.* 1. *Read this whole template first.*
2. *Determine if you are on the right place:* 2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to lstu itself. Refer to its documentation or repository for help.* - *Otherwise, the issue may be due to lstu itself. Refer to its documentation or repository for help.*
- *If you have a doubt, post here, we will figure it out together.* - *If you have a doubt, post here, we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.* 3. *Delete the italic comments as you write over them below, and remove this guide.*
@ -34,8 +34,8 @@ about: Create a report to help us debug, it would be nice to fill the template a
- *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:* - *If the error occurs in your browser, explain what you did:*
1. *Go to '...'* 1. *Go to '...'*
2. *Click on '....'* 2. *Click on '...'*
3. *Scroll down to '....'* 3. *Scroll down to '...'*
4. *See error* 4. *See error*
**Expected behavior** **Expected behavior**

View file

@ -42,7 +42,7 @@ hashed_password=$(ynh_app_setting_get --app=$app --key=hashed_password)
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -84,7 +84,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_script_progression --message="Updating nginx web server configuration..." ynh_script_progression --message="Updating NGINX web server configuration..."
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
@ -169,7 +169,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -99,7 +99,7 @@ ynh_setup_source --dest_dir="$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring nginx web server..." ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
@ -117,7 +117,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# CONFIGURE LSTU # CONFIGURE LSTU
#================================================= #=================================================
ynh_script_progression --message="Configuring lstu..." ynh_script_progression --message="Configuring Lstu..."
config="${final_path}/lstu.conf" config="${final_path}/lstu.conf"
cp ../conf/lstu.conf.template "$config" cp ../conf/lstu.conf.template "$config"
@ -143,7 +143,7 @@ ynh_store_file_checksum --file="$config"
#================================================= #=================================================
# INSTALL LSTU # INSTALL LSTU
#================================================= #=================================================
ynh_script_progression --message="Installing lstu..." ynh_script_progression --message="Installing Lstu..."
pushd $final_path pushd $final_path
carton install --deployment --without=sqlite --without=mysql carton install --deployment --without=sqlite --without=mysql
@ -165,7 +165,7 @@ ynh_add_systemd_config
ynh_script_progression --message="Securing files and directories..." ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files # Set permissions to app files
chown -R www-data $final_path chown -R $app: $final_path
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE
@ -211,7 +211,7 @@ fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -70,7 +70,7 @@ ynh_secure_remove --file="$final_path"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing nginx web server configuration..." ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated nginx config # Remove the dedicated nginx config
ynh_remove_nginx_config ynh_remove_nginx_config

View file

@ -49,7 +49,7 @@ test ! -d $final_path \
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the nginx configuration..." ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -74,7 +74,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Restoring user rights..." ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files # Restore permissions on app files
chown -R www-data $final_path chown -R $app: $final_path
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION
@ -108,7 +108,7 @@ systemctl enable $app.service --quiet
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --log "/var/log/$app.log" --log "/var/www/$app/log/production.log" yunohost service add $app --log="/var/log/$app.log" --log="/var/www/$app/log/production.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
@ -129,7 +129,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -136,7 +136,7 @@ fi
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." 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
@ -218,7 +218,7 @@ ynh_add_systemd_config
ynh_script_progression --message="Securing files and directories..." ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files # Set permissions on app files
chown -R www-data $final_path chown -R $app: $final_path
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
@ -255,7 +255,7 @@ ynh_systemd_action --service_name=$app --action=reload --line_match="Reloaded Sh
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload