From cbf58456e523134648fdfe4d3b7e110a7126436c Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sun, 16 Aug 2015 03:24:38 +0200 Subject: routed - code style fixes - Code style fixes - Create rc file and use {start,stop,restart}_service() instead of custom functions --- config/routed/routed.inc | 102 +++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 47 deletions(-) (limited to 'config/routed') diff --git a/config/routed/routed.inc b/config/routed/routed.inc index f7ace8a5..471c2772 100644 --- a/config/routed/routed.inc +++ b/config/routed/routed.inc @@ -1,8 +1,9 @@ "routed.sh", + "start" => "/usr/bin/nohup /sbin/routed > /dev/null 2>&1 &", + "stop" => "/bin/pkill routed" + ) + ); + conf_mount_ro(); } -function restart_routed() { - stop_routed(); - start_routed(); +function routed_deinstall_command() { + stop_service("routed"); + conf_mount_rw(); + unlink_if_exists("/usr/local/etc/rc.d/routed.sh"); + conf_mount_ro(); } ?> -- cgit v1.2.3