Skip to content

Instantly share code, notes, and snippets.

@jihuichoi
Last active September 19, 2019 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jihuichoi/3f61bf7fd7a56ec7edc3b60802ca8488 to your computer and use it in GitHub Desktop.
Save jihuichoi/3f61bf7fd7a56ec7edc3b60802ca8488 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# # -*- coding: UTF-8 -*-
import os
if __name__ == "__main__":
vlc_config = "~/.config/vlc/vlcrc"
# web http 인터페이스 설정
cmd = "grep extraintf " + vlc_config
output = os.system(cmd)
if output == 0:
cmd = "sed -ie 's/.extraintf.*/extraintf=http/g' " + vlc_config
os.system(cmd)
else:
cmd = "echo 'extraintf=http' >> " + vlc_config
os.system(cmd)
# 비밀번호 변경
cmd = "grep http-password " + vlc_config
output = os.system(cmd)
if output == 0:
cmd = "sed -ie 's/.http-password.*/http-password=1234/g' " + vlc_config
os.system(cmd)
else:
cmd = "echo 'http-password=1234' >> " + vlc_config
os.system(cmd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment