示例#1
0
    def uninstall(self):
        def func():
            return_log = SystemLogicCommand2('삭제', [
                ['msg', u'잠시만 기다려주세요.'],
                [
                    'msg',
                    u'kill.sh 명령 실행 후 웹은 반응이 없습니다. 자동 SJVA 재시작하니 잠시 후 새로고침하세요.'
                ],
                ['{}/data/custom/nginx/files/kill.sh'.format(path_app_root)],
                [
                    '{}/data/custom/nginx/files/uninstall.sh'.format(
                        path_app_root)
                ],
                ['msg', u'삭제가 완료되었습니다.'],
            ],
                                             wait=True,
                                             show_modal=True).start()
            import system
            system.restart()

        if SystemModelSetting.get('port') == '19999':
            SystemModelSetting.set('port', '9999')
        t = threading.Thread(target=func, args=())
        t.setDaemon(True)
        t.start()
示例#2
0
    def install(self):
        def func():
            cmd = [
                ['msg', u'잠시만 기다려주세요.'],
                [
                    '{}/data/custom/nginx/files/install.sh'.format(
                        path_app_root)
                ],
                ['msg', u'설치가 완료되었습니다.'],
            ]
            if is_termux():
                cmd.append(['msg', u'termux를 재시작 해주세요.'])
            else:
                cmd.append(['msg', u'SJVA가 아닌 도커를 재시작 해주세요.'])
                cmd.append(['msg', u'예) docker restart sjva'])
            return_log = SystemLogicCommand2('설치',
                                             cmd,
                                             wait=False,
                                             show_modal=True).start()

        if SystemModelSetting.get('port') != '19999':
            SystemModelSetting.set('port', '19999')

        t = threading.Thread(target=func, args=())
        t.setDaemon(True)
        t.start()