Skip to content

Commit 56d8c6c

Browse files
committed
Update index.py
1 parent 0a0b114 commit 56d8c6c

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

plugins/doh/index.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -97,29 +97,12 @@ def getHomeDir():
9797
return 'www'
9898

9999

100-
def getRunUser():
101-
if mw.isAppleSystem():
102-
user = mw.execShell(
103-
"who | sed -n '2, 1p' |awk '{print $1}'")[0].strip()
104-
return user
105-
else:
106-
return 'www'
107-
108-
__SR = '''#!/bin/bash
109-
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
110-
export PATH
111-
export USER=%s
112-
export HOME=%s && ''' % ( getRunUser(), getHomeDir())
113-
114100

115101
def contentReplace(content):
116102

117103
service_path = mw.getServerDir()
118104
content = content.replace('{$ROOT_PATH}', mw.getFatherDir())
119105
content = content.replace('{$SERVER_PATH}', service_path)
120-
content = content.replace('{$RUN_USER}', getRunUser())
121-
content = content.replace('{$HOME_DIR}', getHomeDir())
122-
123106
return content
124107

125108

0 commit comments

Comments
 (0)