Last active
September 19, 2019 18:09
-
-
Save jihuichoi/3f61bf7fd7a56ec7edc3b60802ca8488 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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