mirror of
https://github.com/YunoHost-Apps/duniter_ynh.git
synced 2024-09-03 18:26:35 +02:00
[fix/Enh] Nginx conf wasn't applied. Add set -eu.
- [fix] do not move in /twp directory. Manage Debian package from current directory. - [enh] add 'set -eu' in install and update scripts. Remove it from remove script.
This commit is contained in:
parent
d4fd65ba63
commit
5dc34890eb
3 changed files with 15 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
#set -e
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
# Retrieve arguments
|
||||
app=duniter
|
||||
|
@ -43,17 +44,16 @@ sudo yunohost firewall allow TCP $port > /dev/null 2>&1
|
|||
ynh_app_setting_set $app port $port
|
||||
|
||||
# Install Duniter
|
||||
cd /tmp
|
||||
arch=$(uname -m)
|
||||
if [ $arch == "x86_64" ]; then
|
||||
arch="x64"
|
||||
wget -nc https://github.com/duniter/duniter/releases/download/$version/duniter-$version-linux-$arch.deb
|
||||
wget -nc https://github.com/duniter/duniter/releases/download/$version/duniter-$version-linux-$arch.deb -P /tmp
|
||||
#elif [ $arch == "armv7l" ]; then
|
||||
# wget -nc https://github.com/duniter/duniter/releases/download/$version/duniter-$version-linux-$arch.deb
|
||||
# wget -nc https://github.com/duniter/duniter/releases/download/$version/duniter-$version-linux-$arch.deb -P /tmp
|
||||
else
|
||||
ynh_die "$arch is not currently supported." 2
|
||||
fi
|
||||
sudo dpkg -i duniter-$version-linux-$arch.deb
|
||||
sudo dpkg -i /tmp/duniter-$version-linux-$arch.deb
|
||||
#sudo rm -f /tmp/duniter-$version-linux-$arch.deb
|
||||
#source ~/.bashrc
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#set -e
|
||||
|
||||
# Source app helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
#set -e
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
app=duniter
|
||||
|
||||
# Stop duniter daemon
|
||||
sudo $app stop
|
||||
|
||||
# Upgrade Duniter package
|
||||
$app restart
|
||||
#dpkg -r
|
||||
#dpkg -i
|
||||
|
||||
# Start duniter daemon
|
||||
sudo $app start
|
||||
|
|
Loading…
Add table
Reference in a new issue