1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gemserv_ynh.git synced 2024-09-03 18:36:27 +02:00

Merge pull request #3 from YunoHost-Apps/testing

Improving service
This commit is contained in:
yalh76 2021-07-14 17:55:40 +02:00 committed by GitHub
commit d1e78f8cb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 34 additions and 29 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
A gemini server written in rust.
**Shipped version:** 0.4.4~ynh1
**Shipped version:** 0.4.5~ynh1
@ -60,7 +60,7 @@ redirect = { "/redirect" = "/", "/newdomain" = "gemini://example.net" }
```
## Documentation and resources
* Upstream app code repository: https://codeberg.org/Valenoern/gemserv
* Upstream app code repository: https://git.sr.ht/~int80h/gemserv
* YunoHost documentation for this app: https://yunohost.org/app_gemserv
* Report a bug: https://github.com/YunoHost-Apps/gemserv_ynh/issues

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
**Version incluse :** 0.4.4~ynh1
**Version incluse :** 0.4.5~ynh1
@ -56,7 +56,7 @@ redirect = { "/redirect" = "/", "/newdomain" = "gemini://example.net" }
```
## Documentations et ressources
* Dépôt de code officiel de l'app : https://codeberg.org/Valenoern/gemserv
* Dépôt de code officiel de l'app : https://git.sr.ht/~int80h/gemserv
* Documentation YunoHost pour cette app : https://yunohost.org/app_gemserv
* Signaler un bug : https://github.com/YunoHost-Apps/gemserv_ynh/issues

View file

@ -14,6 +14,8 @@
setup_private=0
setup_public=0
upgrade=1
# 0.4.4~ynh1
upgrade=1 from_commit=3fcde5a7829938763b393ac1e878929bdc35297f
backup_restore=1
multi_instance=0
port_already_use=0
@ -22,5 +24,5 @@
Email=yalh@yahoo.com
Notification=all
;;; Upgrade options
; commit=CommitHash
name=Name and date of the commit.
; commit=3fcde5a7829938763b393ac1e878929bdc35297f
name=0.4.4~ynh1.

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://codeberg.org/Valenoern/gemserv/archive/v0.4.4.tar.gz
SOURCE_SUM=810f56dfcbd1d8761afac4a5f3fbf64ec352aa78628ade1eb5e41285c58acf2a
SOURCE_URL=https://git.sr.ht/~int80h/gemserv/archive/v0.4.5.tar.gz
SOURCE_SUM=7aeb5edc8af6ebefc2331aebc0c360798711c2fb16ee9cbde8c5c4f9502c491f
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -5,4 +5,3 @@ host = "::"
# are error, warn, and info. If error is set it will only show error. If warn
# is set it will show error and warn. Info shows all three.
log = "info"

View file

@ -7,6 +7,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStartPre=-/bin/bash -c 'chown __APP__:__APP__ /etc/__APP__/'
ExecStartPre=-/bin/bash -c 'cat /etc/__APP__/config.d/*.toml > /etc/__APP__/config.toml'
ExecStart=__FINALPATH__/live/__APP__ /etc/__APP__/config.toml
StandardOutput=append:/var/log/__APP__/__APP__.log

View file

@ -5,11 +5,11 @@
"description": {
"en": "A gemini server written in rust."
},
"version": "0.4.4~ynh1",
"url": "https://codeberg.org/Valenoern/gemserv",
"version": "0.4.5~ynh1",
"url": "https://git.sr.ht/~int80h/gemserv/",
"upstream": {
"license": "MIT",
"code": "https://codeberg.org/Valenoern/gemserv"
"code": "https://git.sr.ht/~int80h/gemserv"
},
"license": "MIT",
"maintainer": {

View file

@ -87,7 +87,7 @@ chown -R $app:$app "$final_path"
#=================================================
ynh_script_progression --message="Making install..."
# Install rustup with the toolchain needed by vaultwarden
# Install rustup with the toolchain needed by Gemserv
pushd "$final_path"
sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
popd
@ -99,7 +99,7 @@ pushd "$final_path"/build
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --release
popd
# Install vaultwarden
# Install Gemserv
cp -af "$final_path/build/target/release/gemserv" "$final_path/live/gemserv"
# Remove build files and rustup

View file

@ -95,25 +95,28 @@ ynh_install_app_dependencies $pkg_dependencies
#=================================================
ynh_script_progression --message="Making install..."
# Install rustup with the toolchain needed by vaultwarden
pushd "$final_path"
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
# Install rustup with the toolchain needed by Gemserv
pushd "$final_path"
sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
popd
popd
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
# Compile Gemserv
pushd "$final_path"/build
# Compile Gemserv
pushd "$final_path"/build
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --release
popd
popd
# Install vaultwarden
cp -af "$final_path/build/target/release/gemserv" "$final_path/live/gemserv"
# Install Gemserv
cp -af "$final_path/build/target/release/gemserv" "$final_path/live/gemserv"
# Remove build files and rustup
ynh_secure_remove --file="$final_path/build"
ynh_secure_remove --file="$final_path/.cargo"
ynh_secure_remove --file="$final_path/.rustup"
# Remove build files and rustup
ynh_secure_remove --file="$final_path/build"
ynh_secure_remove --file="$final_path/.cargo"
ynh_secure_remove --file="$final_path/.rustup"
fi
#=================================================
# UPDATE A CONFIG FILE