Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Commit

Permalink
ref :[server] nice value of guacenc and ffmpeg increased to 10
Browse files Browse the repository at this point in the history
  • Loading branch information
bhrg3se committed Sep 17, 2020
1 parent 6bf41f1 commit 166dd12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/accessproxy/rdpproxy/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,29 @@ func (s GWStore) uploadSessionLog(authlog *logs.AuthLog) error {
func getGuacencCmd(sessionID string) *exec.Cmd {
if os.Getenv("GUACENC_INSTALLED") == "true" {
guacencCmdStr := fmt.Sprintf(
"/usr/local/guacamole/bin/guacenc -f /tmp/trasa/accessproxy/guac/%s.guac", sessionID)
"nice -n 10 /usr/local/guacamole/bin/guacenc -f /tmp/trasa/accessproxy/guac/%s.guac", sessionID)

return exec.Command("/bin/sh", "-c", guacencCmdStr)

}

if runtime.GOOS == "windows" {
guacencCmdStr := fmt.Sprintf(
"docker.exe exec guacd /usr/local/guacamole/bin/guacenc -f /tmp/trasa/accessproxy/guac/%s.guac", sessionID)
"docker.exe exec guacd nice -n 10 /usr/local/guacamole/bin/guacenc -f /tmp/trasa/accessproxy/guac/%s.guac", sessionID)

return exec.Command("powershell", "-c", guacencCmdStr)
}

guacencCmdStr := fmt.Sprintf(
"sudo docker exec guacd /usr/local/guacamole/bin/guacenc -f /tmp/trasa/accessproxy/guac/%s.guac", sessionID)
"sudo docker exec guacd nice -n 10 /usr/local/guacamole/bin/guacenc -f /tmp/trasa/accessproxy/guac/%s.guac", sessionID)
return exec.Command("/bin/bash", "-c", guacencCmdStr)

}

func getFFMPEGcmd(tempFileDir, sessionID string) *exec.Cmd {

if os.Getenv("GUACENC_INSTALLED") == "true" {
ffmpegCmdStr := fmt.Sprintf("ffmpeg -i %s/%s.guac.m4v %s/%s.mp4", tempFileDir, sessionID, tempFileDir, sessionID)
ffmpegCmdStr := fmt.Sprintf("nice -n 10 ffmpeg -i %s/%s.guac.m4v %s/%s.mp4", tempFileDir, sessionID, tempFileDir, sessionID)
return exec.Command("/bin/bash", "-c", ffmpegCmdStr)

}
Expand All @@ -121,7 +121,7 @@ func getFFMPEGcmd(tempFileDir, sessionID string) *exec.Cmd {

}

ffmpegCmdStr := fmt.Sprintf("sudo ffmpeg -i %s/%s.guac.m4v %s/%s.mp4", tempFileDir, sessionID, tempFileDir, sessionID)
ffmpegCmdStr := fmt.Sprintf("sudo nice -n 10 ffmpeg -i %s/%s.guac.m4v %s/%s.mp4", tempFileDir, sessionID, tempFileDir, sessionID)
return exec.Command("/bin/bash", "-c", ffmpegCmdStr)

}

0 comments on commit 166dd12

Please sign in to comment.