1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nomad_ynh.git synced 2024-09-03 19:55:53 +02:00

Remove sudo

This commit is contained in:
yalh76 2022-07-21 19:52:20 +02:00
parent 629fbd55c5
commit 7f6f332110
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ app=$YNH_APP_INSTANCE_NAME
lxc_bridge="lxcbr0"
plage_ip="10.1.44"
main_iface=$(sudo ip route | grep default | awk '{print $5;}')
main_iface=$(ip route | grep default | awk '{print $5;}')
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS

View file

@ -110,7 +110,7 @@ then
lxc_bridge=$(ynh_app_setting_get --app=$app --key=lxc_bridge)
plage_ip=$(ynh_app_setting_get --app=$app --key=plage_ip)
main_iface=$(sudo ip route | grep default | awk '{print $5;}')
main_iface=$(ip route | grep default | awk '{print $5;}')
ynh_app_setting_set --app=$app --key=main_iface --value=$main_iface
ynh_add_config --template="../conf/lxc_bridge" --destination="/etc/network/interfaces.d/$lxc_bridge"
ifup $lxc_bridge --interfaces=/etc/network/interfaces.d/$lxc_bridge