mirror of
https://github.com/YunoHost-Apps/duniter_ynh.git
synced 2024-09-03 18:26:35 +02:00
[fix] launch duniter with root user.
This commit is contained in:
parent
8af377ec38
commit
d4fd65ba63
2 changed files with 8 additions and 9 deletions
|
@ -47,9 +47,9 @@ cd /tmp
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
if [ $arch == "x86_64" ]; then
|
if [ $arch == "x86_64" ]; then
|
||||||
arch="x64"
|
arch="x64"
|
||||||
wget 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
|
||||||
#elif [ $arch == "armv7l" ]; then
|
#elif [ $arch == "armv7l" ]; then
|
||||||
# wget 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
|
||||||
else
|
else
|
||||||
ynh_die "$arch is not currently supported." 2
|
ynh_die "$arch is not currently supported." 2
|
||||||
fi
|
fi
|
||||||
|
@ -58,15 +58,15 @@ sudo dpkg -i duniter-$version-linux-$arch.deb
|
||||||
#source ~/.bashrc
|
#source ~/.bashrc
|
||||||
|
|
||||||
# Configure Duniter node
|
# Configure Duniter node
|
||||||
$app init --autoconf
|
sudo $app init --autoconf
|
||||||
$app config --remoteh $domain --port $port --remotep $port --salt $salt --passwd $password --cpu $cpu
|
sudo $app config --remoteh $domain --port $port --remotep $port --salt $salt --passwd $password --cpu $cpu
|
||||||
|
|
||||||
# Synchronize Duniter node
|
# Synchronize Duniter node
|
||||||
echo "Synchronizing with $sync_node:$sync_port. It may take a while."
|
echo "Synchronizing with $sync_node:$sync_port. It may take a while."
|
||||||
$app sync $sync_node $sync_port --nointeractive
|
sudo $app sync $sync_node $sync_port --nointeractive
|
||||||
|
|
||||||
# Launch Duniter node
|
# Launch Duniter node
|
||||||
$app start
|
sudo $app start
|
||||||
|
|
||||||
# Add Duniter service to the YunoHost monitoring
|
# Add Duniter service to the YunoHost monitoring
|
||||||
sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log
|
sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log
|
||||||
|
|
|
@ -10,11 +10,10 @@ domain=$(ynh_app_setting_get $app domain)
|
||||||
port=$(ynh_app_setting_get $app port)
|
port=$(ynh_app_setting_get $app port)
|
||||||
|
|
||||||
# Remove Duniter
|
# Remove Duniter
|
||||||
source ~/.bashrc
|
sudo $app stop
|
||||||
$app stop
|
|
||||||
sudo dpkg -r $app
|
sudo dpkg -r $app
|
||||||
#rm -Rf $DUNITER_DIR
|
#rm -Rf $DUNITER_DIR
|
||||||
#rm -Rf /home/admin/.config/$app/
|
#rm -Rf /root/.config/$app/
|
||||||
|
|
||||||
# Remove Duniter service to YunoHost monitoring
|
# Remove Duniter service to YunoHost monitoring
|
||||||
sudo yunohost service remove $app
|
sudo yunohost service remove $app
|
||||||
|
|
Loading…
Reference in a new issue