1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/statpingng_ynh.git synced 2024-09-03 20:26:24 +02:00
This commit is contained in:
Éric Gaspar 2023-11-24 20:51:32 +01:00
parent 3c32339833
commit 77b9863670
3 changed files with 6 additions and 35 deletions

View file

@ -13,31 +13,3 @@ STATPING_VERSION="0.90.80"
get_ip() {
curl ip.me
}
# inspired by restic helper
install_statping () {
architecture=$(uname -m)
arch=''
case $architecture in
i386|i686)
arch="386"
;;
x86_64)
arch=amd64
;;
armv*)
arch=arm-7
;;
aarch64)
arch=arm64
;;
*)
echo
ynh_die --message="Unsupported architecture \"$architecture\""
;;
esac
wget https://github.com/statping-ng/statping-ng/releases/download/v$STATPING_VERSION/statping-linux-$arch.tar.gz 2>&1 >/dev/null
tar zxf statping-linux-$arch.tar.gz
rm statping-linux-$arch.tar.gz
chmod +x statping
}

View file

@ -28,10 +28,10 @@ ynh_change_url_nginx_config
#==================================================
# Change config file
#==================================================
ynh_script_progression --message="Modifying configuration file" --weight=1
ynh_script_progression --message="Modifying configuration file..." --weight=1
#ynh_delete_file_checksum --file="$install_dir/.env"
#ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
#ynh_add_config --template=".env" --destination="$install_dir/.env"
sed -i "/DOMAIN=/c\DOMAIN=https://${new_domain}" $install_dir/.env

View file

@ -33,13 +33,12 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
pushd "$install_dir"
install_statping
popd
ynh_setup_source --dest_dir="$install_dir"
fi
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
chmod +x $install_dir/statping
#=================================================
# NGINX CONFIGURATION