Skip to content

Commit

Permalink
flux/entry $(expr $PORT_SSH - 100)
Browse files Browse the repository at this point in the history
  • Loading branch information
sam#gemmi-win10 committed Dec 5, 2023
1 parent d93829c commit b84cd6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flux/src/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ function setXserver(){
tmpDir=/tmp/.headless; mkdir -p $tmpDir && chown headless:headless -R $tmpDir ; #pulse: default-xx.pa

# setPorts; sed port=.* || env_ctReset
sed -i "s^port=3389^port=${PORT_RDP}^g" /etc/xrdp/xrdp.ini
sed -i "s/EFRp 22/EFRp ${PORT_SSH}/g" /etc/supervisor/conf.d/sv.conf #sv.conf
sed -i "s^port=3389^port=$(expr $PORT_RDP - 100)^g" /etc/xrdp/xrdp.ini
sed -i "s/EFRp 22/EFRp $(expr $PORT_SSH - 100)/g" /etc/supervisor/conf.d/sv.conf #sv.conf
# sesman
# SES_PORT=$(echo "${PORT_RDP%??}50") #ref PORT_RDP, replace last 2 char
SES_PORT=$(($PORT_RDP + 100))
SES_PORT=$(expr $PORT_RDP - 100 + 1000) #$(($PORT_RDP + 101)); #without sesman's run?
sed -i "s/ListenPort=3350/ListenPort=${SES_PORT}/g" /etc/xrdp/sesman.ini

# go-sv
Expand Down

0 comments on commit b84cd6c

Please sign in to comment.