Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FunnyWolf committed Dec 3, 2023
1 parent 1062154 commit c0f7238
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Docker/nginxconfig_default/nobody.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EOF
exit
fi

if [ $INPUTNGINXPORT -gt 0 ] 2>/dev/null ;then
if [ $INPUTNGINXPORT -gt 0 ]&&[ $INPUTNGINXPORT -lt 65535 ] 2>/dev/null ;then
Echo_c "使用端口号: $INPUTNGINXPORT"
else
Echo_c "输入端口号不符合要求,使用默认端口60000"
Expand Down
5 changes: 3 additions & 2 deletions viper.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def restart_nginx():
logger.info("[*] 启动nginx服务")
result = subprocess.run(
["service", "nginx", "start"],
stdout=devNull,
stderr=devNull
# stdout=devNull,
# stderr=devNull
)


Expand Down Expand Up @@ -480,6 +480,7 @@ def init_copy_file():
target_file = "/root/viper/Docker/nginxconfig/nobody.sh"
try:
shutil.copy(src_file, target_file)
os.chmod("/root/viper/Docker/nginxconfig/nobody.sh", 0o775)
except shutil.SameFileError:
pass

Expand Down

0 comments on commit c0f7238

Please sign in to comment.