diff options
Diffstat (limited to 'net-misc/olsrd/files/olsrd')
-rw-r--r-- | net-misc/olsrd/files/olsrd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net-misc/olsrd/files/olsrd b/net-misc/olsrd/files/olsrd new file mode 100644 index 000000000000..5b0a68a8d9ac --- /dev/null +++ b/net-misc/olsrd/files/olsrd @@ -0,0 +1,26 @@ +#!/sbin/runscript + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/olsrd.conf ]; then + eerror "You need a /etc/olsrd.conf file to run olsrd" + eerror "There is sample file in /usr/share/doc/olsrd-version/" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting olsrd" + start-stop-daemon --start --quiet --background --exec /usr/sbin/olsrd + eend $? +} + +stop() { + ebegin "Stopping olsrd" + start-stop-daemon --stop --quiet --exec /usr/sbin/olsrd + eend $? +} |