mirror of
https://github.com/YunoHost-Apps/ifconfig-io_ynh.git
synced 2024-09-03 20:36:27 +02:00
Merge pull request #29 from YunoHost-Apps/testing
This commit is contained in:
commit
f123855705
16 changed files with 61 additions and 56 deletions
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
# ifconfig-io for YunoHost
|
# ifconfig-io for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/ifconfig-io)  
|
[](https://ci-apps.yunohost.org/ci/apps/ifconfig-io/)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ I used the gin framework as it does several things to ensure that there are no m
|
||||||
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 2024.04.20~ynh1
|
**Shipped version:** 2024.07.02~ynh1
|
||||||
|
|
||||||
**Demo:** <https://ifconfig.io>
|
**Demo:** <https://ifconfig.io>
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
|
@ -5,7 +5,7 @@ No se debe editar a mano.
|
||||||
|
|
||||||
# ifconfig-io para Yunohost
|
# ifconfig-io para Yunohost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/ifconfig-io)  
|
[](https://ci-apps.yunohost.org/ci/apps/ifconfig-io/)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ I used the gin framework as it does several things to ensure that there are no m
|
||||||
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
||||||
|
|
||||||
|
|
||||||
**Versión actual:** 2024.04.20~ynh1
|
**Versión actual:** 2024.07.02~ynh1
|
||||||
|
|
||||||
**Demo:** <https://ifconfig.io>
|
**Demo:** <https://ifconfig.io>
|
||||||
## Documentaciones y recursos
|
## Documentaciones y recursos
|
||||||
|
|
|
@ -5,7 +5,7 @@ EZ editatu eskuz.
|
||||||
|
|
||||||
# ifconfig-io YunoHost-erako
|
# ifconfig-io YunoHost-erako
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/ifconfig-io)  
|
[](https://ci-apps.yunohost.org/ci/apps/ifconfig-io/)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ I used the gin framework as it does several things to ensure that there are no m
|
||||||
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
||||||
|
|
||||||
|
|
||||||
**Paketatutako bertsioa:** 2024.04.20~ynh1
|
**Paketatutako bertsioa:** 2024.07.02~ynh1
|
||||||
|
|
||||||
**Demoa:** <https://ifconfig.io>
|
**Demoa:** <https://ifconfig.io>
|
||||||
## Dokumentazioa eta baliabideak
|
## Dokumentazioa eta baliabideak
|
||||||
|
|
|
@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
|
||||||
|
|
||||||
# ifconfig-io pour YunoHost
|
# ifconfig-io pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/ifconfig-io)  
|
[](https://ci-apps.yunohost.org/ci/apps/ifconfig-io/)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ I used the gin framework as it does several things to ensure that there are no m
|
||||||
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 2024.04.20~ynh1
|
**Version incluse :** 2024.07.02~ynh1
|
||||||
|
|
||||||
**Démo :** <https://ifconfig.io>
|
**Démo :** <https://ifconfig.io>
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
|
@ -5,7 +5,7 @@ NON debe editarse manualmente.
|
||||||
|
|
||||||
# ifconfig-io para YunoHost
|
# ifconfig-io para YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/ifconfig-io)  
|
[](https://ci-apps.yunohost.org/ci/apps/ifconfig-io/)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ I used the gin framework as it does several things to ensure that there are no m
|
||||||
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
||||||
|
|
||||||
|
|
||||||
**Versión proporcionada:** 2024.04.20~ynh1
|
**Versión proporcionada:** 2024.07.02~ynh1
|
||||||
|
|
||||||
**Demo:** <https://ifconfig.io>
|
**Demo:** <https://ifconfig.io>
|
||||||
## Documentación e recursos
|
## Documentación e recursos
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# YunoHost 上的 ifconfig-io
|
# YunoHost 上的 ifconfig-io
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/ifconfig-io)  
|
[](https://ci-apps.yunohost.org/ci/apps/ifconfig-io/)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
[](https://install-app.yunohost.org/?app=ifconfig-io)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ I used the gin framework as it does several things to ensure that there are no m
|
||||||
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
Tested to handle 15,000 requests persecond on modest hardware with an average response time of 130ms.
|
||||||
|
|
||||||
|
|
||||||
**分发版本:** 2024.04.20~ynh1
|
**分发版本:** 2024.07.02~ynh1
|
||||||
|
|
||||||
**演示:** <https://ifconfig.io>
|
**演示:** <https://ifconfig.io>
|
||||||
## 文档与资源
|
## 文档与资源
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||||
|
|
||||||
packaging_format = 2
|
packaging_format = 2
|
||||||
|
|
||||||
id = "ifconfig-io"
|
id = "ifconfig-io"
|
||||||
|
@ -5,7 +7,7 @@ name = "ifconfig-io"
|
||||||
description.en = "IP API service to get their public IP address"
|
description.en = "IP API service to get their public IP address"
|
||||||
description.fr = "Service API IP pour obtenir leur adresse IP publique"
|
description.fr = "Service API IP pour obtenir leur adresse IP publique"
|
||||||
|
|
||||||
version = "2024.04.20~ynh1"
|
version = "2024.07.02~ynh1"
|
||||||
|
|
||||||
maintainers = ["Fabian Wilkens"]
|
maintainers = ["Fabian Wilkens"]
|
||||||
|
|
||||||
|
@ -44,8 +46,8 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://github.com/georgyo/ifconfig.io/archive/6c13119b0b9cbf21143e4ca912dae26521dce8ae.tar.gz"
|
url = "https://github.com/georgyo/ifconfig.io/archive/57dcaffc5c74ae40ca3143ceeb0af64bf436ee63.tar.gz"
|
||||||
sha256 = "c61e36a3123c5fe48c0bd8c17b2a25f6af6f650ef4b5887df32096f4c5ce547e"
|
sha256 = "c3d7cfe762f7525e07524219a708ccdf2c4c57d4a6cea6eedcbababdd1069780"
|
||||||
autoupdate.strategy = "latest_github_commit"
|
autoupdate.strategy = "latest_github_commit"
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
GO_VERSION="1.19"
|
#=================================================
|
||||||
|
# COMMON VARIABLES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
GO_VERSION="1.22"
|
||||||
|
|
||||||
|
app_path="$install_dir/go/src/github.com/georgyo/ifconfig.io"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PERSONAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# EXPERIMENTAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# FUTURE OFFICIAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -3,14 +3,12 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
app_path="$install_dir/go/src/github.com/georgyo/ifconfig.io"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing go..." --weight=5
|
ynh_script_progression --message="Installing go..." --weight=5
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
|
ynh_exec_warn_less ynh_install_go --go_version="$GO_VERSION"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -20,7 +18,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
ynh_setup_source --dest_dir="$app_path"
|
ynh_setup_source --dest_dir="$app_path"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
|
@ -34,8 +32,8 @@ export GOCACHE="$install_dir/go/.cache"
|
||||||
export GO111MODULE=on
|
export GO111MODULE=on
|
||||||
|
|
||||||
pushd "$app_path"
|
pushd "$app_path"
|
||||||
ynh_exec_warn_less $ynh_go mod download
|
ynh_exec_warn_less ynh_exec_as "$app" "$ynh_go" mod download
|
||||||
ynh_exec_warn_less $ynh_go build -tags=jsoniter
|
ynh_exec_warn_less ynh_exec_as "$app" "$ynh_go" build -tags=jsoniter
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -51,7 +49,7 @@ ynh_add_systemd_config
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate --logfile="/var/log/$app/$app.log"
|
ynh_use_logrotate --logfile="/var/log/$app/$app.log"
|
||||||
|
|
||||||
yunohost service add $app --description="IP address API" --log="/var/log/$app/$app.log"
|
yunohost service add "$app" --description="IP address API" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
@ -59,7 +57,7 @@ yunohost service add $app --description="IP address API" --log="/var/log/$app/$a
|
||||||
ynh_script_progression --message="Starting service..." --weight=1
|
ynh_script_progression --message="Starting service..." --weight=1
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -4,13 +4,12 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# REMOVE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
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`)
|
# 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
|
if ynh_exec_warn_less yunohost service status $app >/dev/null; then
|
||||||
then
|
|
||||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
|
||||||
yunohost service remove $app
|
yunohost service remove $app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC START
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -17,19 +15,17 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
ynh_restore_file --origin_path="$install_dir"
|
ynh_restore_file --origin_path="$install_dir"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
mkdir -p "/var/log/$app"
|
mkdir -p "/var/log/$app"
|
||||||
chown -R $app: "/var/log/$app"
|
chown -R "$app:" "/var/log/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC RESTORATION
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=5
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=5
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
|
ynh_exec_warn_less ynh_install_go --go_version="$GO_VERSION"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
@ -48,7 +44,7 @@ yunohost service add $app --description="IP address API" --log="/var/log/$app/$a
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,13 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
app_path="$install_dir/go/src/github.com/georgyo/ifconfig.io"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading go..." --weight=5
|
ynh_script_progression --message="Upgrading go..." --weight=5
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
|
ynh_exec_warn_less ynh_install_go --go_version="$GO_VERSION"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD UPGRADE STEPS
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STOP SYSTEMD SERVICE
|
# STOP SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -29,7 +25,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
ynh_setup_source --dest_dir="$app_path" --full_replace=1
|
ynh_setup_source --dest_dir="$app_path" --full_replace=1
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
|
@ -42,8 +38,8 @@ export GOCACHE="$install_dir/go/.cache"
|
||||||
export GO111MODULE=on
|
export GO111MODULE=on
|
||||||
|
|
||||||
pushd "$app_path"
|
pushd "$app_path"
|
||||||
ynh_exec_warn_less $ynh_go mod download
|
ynh_exec_warn_less ynh_exec_as "$app" "$ynh_go" mod download
|
||||||
ynh_exec_warn_less $ynh_go build -tags=jsoniter
|
ynh_exec_warn_less ynh_exec_as "$app" "$ynh_go" build -tags=jsoniter
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -57,14 +53,14 @@ ynh_add_systemd_config
|
||||||
|
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
yunohost service add $app --description="IP address API" --log="/var/log/$app/$app.log"
|
yunohost service add "$app" --description="IP address API" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
2
sources/extra_files/app/.gitignore
vendored
2
sources/extra_files/app/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
2
sources/patches/.gitignore
vendored
2
sources/patches/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
*.sw[op]
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
|
||||||
|
|
||||||
test_format = 1.0
|
test_format = 1.0
|
||||||
|
|
||||||
[default]
|
[default]
|
||||||
|
|
Loading…
Add table
Reference in a new issue