Update index.py

pull/109/head
midoks 7 years ago
parent 8d6589d1d7
commit 64fb414335
  1. 22
      plugins/csvn/index.py

@ -63,6 +63,12 @@ def status():
def csvnOp(method): def csvnOp(method):
if not app_debug:
os_name = public.getOs()
if os_name == 'darwin':
return "Apple Computer does not support"
_initd_csvn = '/etc/init.d/csvn' _initd_csvn = '/etc/init.d/csvn'
_initd_csvn_httpd = '/etc/init.d/csvn-httpd' _initd_csvn_httpd = '/etc/init.d/csvn-httpd'
@ -113,9 +119,11 @@ def initdInstall():
_csvn = getServerDir() + '/bin/csvn' _csvn = getServerDir() + '/bin/csvn'
_csvn_httpd = getServerDir() + '/bin/csvn-httpd' _csvn_httpd = getServerDir() + '/bin/csvn-httpd'
public.execShell(_csvn + ' install') ret_csvn = public.execShell(_csvn + ' install')
public.execShell(_csvn_httpd + ' install') ret_csvn_httpd = public.execShell(_csvn_httpd + ' install')
return 'ok' if ret_csvn[1] == '' and ret_csvn_httpd[1] == '':
return 'ok'
return 'fail'
def initdUinstall(): def initdUinstall():
@ -127,9 +135,11 @@ def initdUinstall():
_csvn = getServerDir() + '/bin/csvn' _csvn = getServerDir() + '/bin/csvn'
_csvn_httpd = getServerDir() + '/bin/csvn-httpd' _csvn_httpd = getServerDir() + '/bin/csvn-httpd'
public.execShell(_csvn + ' uninstall') ret_csvn = public.execShell(_csvn + ' remove')
public.execShell(_csvn_httpd + ' uninstall') ret_csvn_httpd = public.execShell(_csvn_httpd + ' remove')
return 'ok' if ret_csvn[1] == '' and ret_csvn_httpd[1] == '':
return 'ok'
return 'fail'
if __name__ == "__main__": if __name__ == "__main__":
func = sys.argv[1] func = sys.argv[1]

Loading…
Cancel
Save