# 卸载linux服务
# sudo python3 uninstall_linux_service.py
import os
import subprocess
import sys
if 82 - 82: Iii1i
if 87 - 87: Ii % i1i1i1111I . Oo / OooOoo * I1Ii1I1 - I1I
def run_file ( cmd ) :
 try :
  if 81 - 81: i1 + ooOOO / oOo0O00 * i1iiIII111 * IiIIii11Ii
  subprocess . run ( cmd . split ( ) , timeout = 5 )
 except Exception as OOoOoo000O00 :
  print ( OOoOoo000O00 )
  print ( cmd )
  if 55 - 55: o0Oo - ii1I1iII1I1I . i1I1IiIIiIi1 % oo0O000ooO * iIIiiIIiii1
  if 11 - 11: ooo0O0oO00
if __name__ == '__main__' :
 wgcloudpathdir = os . path . dirname ( os . path . abspath ( __file__ ) )
 print ( "wgcloudpathdir=" , wgcloudpathdir )
 pythonexe = sys . executable
 if 55 - 55: I11II1Ii % iIi
 wg1001servicefilename = "wg1001.service"
 if os . path . exists ( "/etc/systemd/system/{}" . format ( wg1001servicefilename ) ) :
  run_file ( 'systemctl stop {}' . format ( "wg1001" ) )
  if 76 - 76: I11II1Ii / Iii1i / Ii . i1i1i1111I / Ii
  run_file ( 'systemctl disable {}' . format ( wg1001servicefilename ) )
  run_file ( 'rm /etc/systemd/system/{}' . format ( wg1001servicefilename ) )
  if 43 - 43: iIIiiIIiii1
 print ( "uninstall 1001CloudServer service (wg1001) finished.\r\n" )
 if 31 - 31: oo0O000ooO * ooo0O0oO00 / OooOoo
 Vw3000servicefilename = "wgVw3000.service"
 if os . path . exists ( "/etc/systemd/system/{}" . format ( Vw3000servicefilename ) ) :
  run_file ( 'systemctl stop {}' . format ( "wgVw3000" ) )
  if 93 - 93: oo0O000ooO % oo0O000ooO / I1I - Oo . ii1I1iII1I1I
  run_file ( 'systemctl disable {}' . format ( Vw3000servicefilename ) )
  run_file ( 'rm /etc/systemd/system/{}' . format ( Vw3000servicefilename ) )
  if 46 - 46: i1I1IiIIiIi1 - Ii * Oo * Ii
 print ( "uninstall Vw3000 service (wgVw3000) finished.\r\n" )
 print ( "\r\n" )
 print ( "\r\n" )
 if 52 - 52: Oo + I1I / ooo0O0oO00 / OooOoo - I1Ii1I1 - ooOOO
 if 60 - 60: i1I1IiIIiIi1 . ooo0O0oO00
 if 13 - 13: ooo0O0oO00
 if 2 - 2: i1
 if 22 - 22: oo0O000ooO - o0Oo / I1Ii1I1 . o0Oo
 if 1 - 1: i1I1IiIIiIi1 + ii1I1iII1I1I + ooo0O0oO00 * oo0O000ooO
 if 20 - 20: I1I + Ii
 if 75 - 75: Ii % i1iiIII111 * Ii . oo0O000ooO % iIIiiIIiii1 % I1Ii1I1
# dd678faae9ac167bc83abf78e5cb2f3f0688d3a3
