mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -53,8 +53,8 @@ def get_ssh_info():
|
||||
@blueprint.route('/set_ping', endpoint='set_ping', methods=['POST'])
|
||||
@panel_login_required
|
||||
def set_ping():
|
||||
return MwFirewall.instance().setPing()
|
||||
|
||||
status = request.form.get('status')
|
||||
return MwFirewall.instance().setPing(status)
|
||||
|
||||
# 修改ssh端口
|
||||
@blueprint.route('/set_ssh_port', endpoint='set_ssh_port', methods=['POST'])
|
||||
|
||||
@@ -218,11 +218,10 @@ class Firewall(object):
|
||||
data['firewall_status'] = self.getFwStatus()
|
||||
return mw.getJson(data)
|
||||
|
||||
def setPing(self):
|
||||
def setPing(self, status):
|
||||
if mw.isAppleSystem():
|
||||
return mw.returnData(True, '开发机不能操作!')
|
||||
|
||||
status = request.form.get('status')
|
||||
filename = '/etc/sysctl.conf'
|
||||
conf = mw.readFile(filename)
|
||||
if conf.find('net.ipv4.icmp_echo') != -1:
|
||||
|
||||
Reference in New Issue
Block a user