nivs

enable icmp after up apps

Mar 14th, 2012
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import time
  4. import os
  5.  
  6. key = True
  7. while key :
  8.     time.sleep(1)
  9.     grep = os.popen ("ps -A | grep idjc")
  10.     string = grep.readlines()
  11.     can_find = len(string)
  12.     if can_find == 2 :
  13.     time.sleep(10)
  14.         os.popen("echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all")
  15.         key = False
Advertisement
Add Comment
Please, Sign In to add comment