From cc46c0c1e3ff63fc62d29b52aa208c7b170ded86 Mon Sep 17 00:00:00 2001 From: Jakob Olsson Date: Thu, 4 Oct 2018 16:42:06 +0200 Subject: [PATCH] initd: give root flag based on owsd config --- topologyd/files/etc/init.d/topologyd | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/topologyd/files/etc/init.d/topologyd b/topologyd/files/etc/init.d/topologyd index a27d29b4b..ac51ca8de 100755 --- a/topologyd/files/etc/init.d/topologyd +++ b/topologyd/files/etc/init.d/topologyd @@ -7,9 +7,15 @@ USE_PROCD=1 start_service() { procd_open_instance - config_load topologyd - procd_set_param command "/sbin/topologyd" - procd_append_param command --root + config_load owsd + config_get enable ubusproxy enable + procd_set_param command "/sbin/topologyd" + + if [ "$enable" ] + then + procd_append_param command --root + fi + procd_set_param respawn procd_set_param stdout 1 procd_set_param stderr 1