Jump to content

Recommended Posts

Posted

Помогите написать скрипт, выполняющий команду ndmq -p 'interface WifiMaster0/WifiStation0 down' -P message, именно при падении WAN. А при ручном поднятии не срабатывала команда. На данный момент пишу в скрипте в каталоге /opt/etc/ndm/wan.d/ эту команду, а она выполняется и при падении, и поднятии интерфейса.

Posted (edited)

Вроде сам разобрался, написал следующий скрипт и положил в /opt/etc/ndm/wan.d/

Скрытый текст

#!/bin/sh
link=`ndmq -p 'show interface WifiMaster0/WifiStation0' -P link`
if [ $link = down ]; then
    ndmq -p 'interface WifiMaster0/WifiStation0 down' -P message
fi

 

Edited by pochta-kst
  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies. By clicking "I accept" or continuing to browse the site, you authorize their use in accordance with the Privacy Policy.