summaryrefslogtreecommitdiff
path: root/templates/service/telnet/node.def
blob: 844aec988ed2ba165f6097ac83dabb8d6f0ab8b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
help: "Enable/disable telnet protocol"
delete: " \
  if ! env | grep -q SSH_TTY=; then \
    if [[ \"`tty`\" == /dev/pts/* ]]; then \
      echo \"Please configure telnet settings via ssh or console.\"; \
      exit 1; \
    fi; \
  fi; \
  sudo /opt/vyatta/sbin/telnetd.init stop"
end: " \
  if ! env | grep -q SSH_TTY=; then \
    if [[ \"`tty`\" == /dev/pts/* ]]; then \
      echo \"Please configure telnet settings via ssh or console.\"; \
      exit 1; \
    fi; \
  fi; \
  if [ -z \"$(port/@)\" ]; then exit 0; fi; \
  sudo /opt/vyatta/sbin/telnetd.init restart $(port/@)"