diff --git a/LSTU_screenshot.png b/LSTU_screenshot.png new file mode 100644 index 0000000..346d249 Binary files /dev/null and b/LSTU_screenshot.png differ diff --git a/README.md b/README.md index f933c09..e0c5d21 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Lstu means Let's Shorten That Url. +Lstu means Let's Shorten That URL. **Shipped version:** 0.22-0 ## Screenshots -![](https://framalibre.org/sites/default/files/Screenshot_20161213_120016_1.png) +![](LSTU_screenshot.png) ## Demo diff --git a/actions.json b/actions.json index 2f7577b..34dfc3f 100644 --- a/actions.json +++ b/actions.json @@ -8,14 +8,16 @@ 0 ], "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": [ { "name": "is_public", "type": "boolean", "ask": { - "en": "Is it a public app ?" + "en": "Is it a public app?", + "fr": "Est-ce une application publique ?" }, "default": true } diff --git a/conf/lstu-minion@.service b/conf/lstu-minion@.service index 7363924..20ac888 100644 --- a/conf/lstu-minion@.service +++ b/conf/lstu-minion@.service @@ -4,7 +4,9 @@ Documentation=https://framagit.org/luc/lstu [Service] Type=forking -User=www-data +User=__APP__ +Restart=always +RestartSec=10 WorkingDirectory=__FINALPATH__ ExecStart=/usr/bin/carton exec script/application minion worker diff --git a/conf/systemd.service b/conf/systemd.service index b499d7f..205089d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,7 +6,7 @@ After=network.target [Service] Type=forking -User=www-data +User=__APP__ Restart=always RestartSec=10 WorkingDirectory=__FINALPATH__ diff --git a/issue_template.md b/issue_template.md index d20c2d8..95f9f29 100644 --- a/issue_template.md +++ b/issue_template.md @@ -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** 1. *Read this whole template first.* 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.* - *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.* @@ -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 the error occurs in your browser, explain what you did:* 1. *Go to '...'* - 2. *Click on '....'* - 3. *Scroll down to '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* **Expected behavior** diff --git a/scripts/change_url b/scripts/change_url index d81e2c0..1b2ae87 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -42,7 +42,7 @@ hashed_password=$(ynh_app_setting_get --app=$app --key=hashed_password) #================================================= # 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 ynh_backup_before_upgrade @@ -84,7 +84,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # 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 @@ -169,7 +169,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" -- #================================================= # 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 diff --git a/scripts/install b/scripts/install index e473c3d..7549132 100644 --- a/scripts/install +++ b/scripts/install @@ -99,7 +99,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." +ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated nginx config ynh_add_nginx_config @@ -117,7 +117,7 @@ ynh_system_user_create --username=$app #================================================= # CONFIGURE LSTU #================================================= -ynh_script_progression --message="Configuring lstu..." +ynh_script_progression --message="Configuring Lstu..." config="${final_path}/lstu.conf" cp ../conf/lstu.conf.template "$config" @@ -143,7 +143,7 @@ ynh_store_file_checksum --file="$config" #================================================= # INSTALL LSTU #================================================= -ynh_script_progression --message="Installing lstu..." +ynh_script_progression --message="Installing Lstu..." pushd $final_path carton install --deployment --without=sqlite --without=mysql @@ -165,7 +165,7 @@ ynh_add_systemd_config ynh_script_progression --message="Securing files and directories..." # Set permissions to app files -chown -R www-data $final_path +chown -R $app: $final_path #================================================= # SETUP LOGROTATE @@ -211,7 +211,7 @@ fi #================================================= # 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 diff --git a/scripts/remove b/scripts/remove index 328174a..b50047e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -70,7 +70,7 @@ ynh_secure_remove --file="$final_path" #================================================= # 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 ynh_remove_nginx_config diff --git a/scripts/restore b/scripts/restore index ff85951..4696e08 100644 --- a/scripts/restore +++ b/scripts/restore @@ -49,7 +49,7 @@ test ! -d $final_path \ #================================================= # 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" @@ -74,7 +74,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files -chown -R www-data $final_path +chown -R $app: $final_path #================================================= # SPECIFIC RESTORATION @@ -108,7 +108,7 @@ systemctl enable $app.service --quiet #================================================= 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 @@ -129,7 +129,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # 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 diff --git a/scripts/upgrade b/scripts/upgrade index cb5ffe6..bc04e31 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,7 +136,7 @@ fi #================================================= # 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 ynh_add_nginx_config @@ -218,7 +218,7 @@ ynh_add_systemd_config ynh_script_progression --message="Securing files and directories..." # Set permissions on app files -chown -R www-data $final_path +chown -R $app: $final_path #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -255,7 +255,7 @@ ynh_systemd_action --service_name=$app --action=reload --line_match="Reloaded Sh #================================================= # 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