Exemplo n.º 1
0
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import platform
import re
import shutil
import sys
import tempfile
import time
import traceback

import Utils.HandlerUtil as Util
from waagentloader import load_waagent

waagent = load_waagent()

# Define global variables
ExtensionShortName = 'VMAccess'
BeginCertificateTag = '-----BEGIN CERTIFICATE-----'
EndCertificateTag = '-----END CERTIFICATE-----'
OutputSplitter = ';'
SshdConfigPath = '/etc/ssh/sshd_config'

def main():
    waagent.LoggerInit('/var/log/waagent.log', '/dev/stdout')
    waagent.Log("%s started to handle." % (ExtensionShortName))
    waagent.MyDistro = waagent.GetMyDistro()

    try:
        for a in sys.argv[1:]:
Exemplo n.º 2
0
import os
import sys
import imp
import base64
import re
import json
import platform
import shutil
import time
import traceback

import Utils.HandlerUtil as Util

from waagentloader import load_waagent
waagent = load_waagent()

# Define global variables
ExtensionShortName = 'VMAccess'
BeginCertificateTag = '-----BEGIN CERTIFICATE-----'
EndCertificateTag = '-----END CERTIFICATE-----'
OutputSplitter = ';'


def main():
    waagent.LoggerInit('/var/log/waagent.log', '/dev/stdout')
    waagent.Log("%s started to handle." % (ExtensionShortName))
    waagent.MyDistro = waagent.GetMyDistro()

    try:
        for a in sys.argv[1:]: