Commit 74c3f122 authored by ibuler's avatar ibuler

[Update] 添加脚本,将windows协议改为rdp

parent ac238aa3
......@@ -43,7 +43,7 @@ class Gateway(AssetUser):
ip = models.GenericIPAddressField(max_length=32, verbose_name=_('IP'), db_index=True)
port = models.IntegerField(default=22, verbose_name=_('Port'))
protocol = models.CharField(choices=PROTOCOL_CHOICES, max_length=16, default=SSH_PROTOCOL, verbose_name=_("Protocol"))
domain = models.ForeignKey(Domain, verbose_name=_("Domain"))
domain = models.ForeignKey(Domain, verbose_name=_("Domain"), on_delete=models.CASCADE)
comment = models.CharField(max_length=128, blank=True, null=True, verbose_name=_("Comment"))
is_active = models.BooleanField(default=True, verbose_name=_("Is active"))
......
#!/bin/bash
#
python ../apps/manage.py shell << EOF
from assets.models import Asset
Asset.objects.filter(platform__startswith='Win').update(protocol='rdp')
EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment