mirror of
https://github.com/YunoHost-Apps/haste_ynh.git
synced 2024-09-03 20:36:28 +02:00
Fix
This commit is contained in:
parent
d6a4da788f
commit
34cfd7372a
9 changed files with 52 additions and 15 deletions
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1 @@
|
|||
Haste is an open-source pastebin software written in node.js, which is easily installable in any network. YunoHost Project uses Haste as pastebin for log sharing: [paste.yunohost.org](https://paste.yunohost.org/)
|
1
doc/DESCRIPTION_fr.md
Normal file
1
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1 @@
|
|||
Haste est un logiciel pastebin open-source écrit en node.js, facilement installable sur n'importe quel réseau. Le projet YunoHost utilise Haste comme pastebin pour le partage de log : [paste.yunohost.org](https://paste.yunohost.org/)
|
14
doc/DISCLAIMER.md
Normal file
14
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
#### Multi-user support
|
||||
|
||||
* Are LDAP and HTTP auth supported? **No**
|
||||
* Can the app be used by multiple users? **Yes**
|
||||
|
||||
## `haste` command
|
||||
|
||||
This Haste package for Yunohost includes the [`haste` command](https://github.com/diethnis/standalones/blob/master/hastebin.sh), allowing you to share content from terminal:
|
||||
|
||||
```bash
|
||||
cat something | haste
|
||||
https://haste.example.com/zuyejeduzu
|
||||
```
|
||||
The [Haste-client](https://github.com/seejohnrun/haste-client) is a simple client for uploading data to you Haste server.
|
15
doc/DISCLAIMER_fr.md
Normal file
15
doc/DISCLAIMER_fr.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
### Support multi-utilisateur
|
||||
|
||||
* L'authentification LDAP et HTTP est-elle prise en charge ? **Non**
|
||||
* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
|
||||
|
||||
## `haste` command
|
||||
|
||||
Ce paquet de Haste pour YunoHost comprend une commande [`haste`](https://github.com/diethnis/standalones/blob/master/hastebin.sh), vous permettant de partager du contenu avec le terminal :
|
||||
|
||||
```bash
|
||||
cat something | haste
|
||||
https://haste.example.com/zuyejeduzu
|
||||
```
|
||||
|
||||
Le [client Haste](https://github.com/seejohnrun/haste-client) est un client simple pour télécharger des données sur votre serveur Haste.
|
Before Width: | Height: | Size: 534 KiB After Width: | Height: | Size: 534 KiB |
|
@ -6,8 +6,15 @@
|
|||
"en": "Open-source pastebin allowing to upload texts",
|
||||
"fr": "Pastebin open-source permettant de mettre en ligne du texte"
|
||||
},
|
||||
"version": "0.1.0~ynh7",
|
||||
"url": "https://github.com/seejohnrun/haste-server",
|
||||
"version": "0.1.0~ynh8",
|
||||
"url": "http://hastebin.com/",
|
||||
"upstream": {
|
||||
"license": "MIT",
|
||||
"website": "https://example.com",
|
||||
"demo": "http://hastebin.com/",
|
||||
"userdoc": "https://hastebin.com/about.md",
|
||||
"code": "https://github.com/seejohnrun/haste-server"
|
||||
},
|
||||
"license": "MIT",
|
||||
"maintainer": {
|
||||
"name": "eric_G",
|
||||
|
|
|
@ -96,7 +96,6 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
|||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
@ -104,10 +103,10 @@ ynh_add_systemd_config
|
|||
# INSTALL HASTEBIN
|
||||
#=================================================
|
||||
|
||||
pushd "$final_path" || ynh_die
|
||||
pushd "$final_path"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_npm install
|
||||
popd || ynh_die
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# CREATE DIRECTORY FOR DATA
|
||||
|
@ -116,10 +115,14 @@ ynh_script_progression --message="Creating the data directory..."
|
|||
|
||||
# Define app's data directory
|
||||
data_path="/home/yunohost.app/${app}"
|
||||
ynh_app_setting_set --app=$app --key=data_path --value=$data_path
|
||||
|
||||
# Create app folders
|
||||
mkdir -p "$data_path"
|
||||
ynh_app_setting_set --app=$app --key=data_path --value=$data_path
|
||||
|
||||
chmod 750 "$data_path"
|
||||
chmod -R o-rwx "$data_path"
|
||||
chown -R $app:www-data "$data_path"
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE HASTE
|
||||
|
@ -148,7 +151,6 @@ ynh_add_config --template="../conf/haste.sh" --destination="/usr/bin/$app"
|
|||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
chown -R $app: $data_path
|
||||
chmod +x /usr/bin/$app
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -33,8 +33,6 @@ data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
||||
|
||||
ynh_webpath_available $domain $path_url \
|
||||
|| ynh_die "Path not available: ${domain}${path_url}"
|
||||
test ! -d $final_path \
|
||||
|| ynh_die "There is already a directory: $final_path "
|
||||
|
||||
|
@ -66,6 +64,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
|
|||
#=================================================
|
||||
# INSTALL NODEJS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
|
@ -73,7 +72,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
|||
# RESTORE VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "$data_path"
|
||||
ynh_restore_file --origin_path="$data_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE BINARY
|
||||
|
|
|
@ -115,10 +115,10 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
|||
# UPGRADE NPM MODULES
|
||||
#=================================================
|
||||
|
||||
pushd "$final_path" || ynh_die
|
||||
pushd "$final_path"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less ynh_npm install
|
||||
popd || ynh_die
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
|
@ -134,7 +134,6 @@ ynh_use_logrotate --non-append
|
|||
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
|
||||
|
||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
@ -163,7 +162,6 @@ ynh_add_config --template="../conf/haste.sh" --destination="/usr/bin/$app"
|
|||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
chown -R $app: $data_path
|
||||
chmod +x /usr/bin/$app
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue