mirror of
https://github.com/YunoHost-Apps/statpingng_ynh.git
synced 2024-09-03 20:26:24 +02:00
cleaning
This commit is contained in:
parent
3c32339833
commit
77b9863670
3 changed files with 6 additions and 35 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -30,16 +30,15 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
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
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue