@@ -187,16 +187,16 @@ function _lauch_or_install()
187187
188188
189189 pulseaudio --start --load=" module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1 >> /dev/null
190- # if [[ -f "${CACHE_ROOT}"/fs-manager-hippo/etc/scripts/vncserver/startvnc.sh ]] && [[ ! -f ${HIPPO_DIR}/bin/startvnc ]]; then
191- # DIR="${CACHE_ROOT}/fs-manager-hippo/etc/scripts/vncserver/startvnc.sh"
192- # cp "${DIR}" ${HIPPO_DIR}/bin/startvnc
193- # proot-distro login hippo -- chmod 775 /bin/startvnc
194- # fi
195- # if [ -f "${CACHE_ROOT}"/fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh ] && [ ! -f ${HIPPO_DIR}/bin/stopvnc ]; then
196- # DIR="${CACHE_ROOT}/fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh"
197- # cp "${DIR}" ${HIPPO_DIR}/bin/stopvnc
198- # proot-distro login hippo -- chmod 775 /bin/stopvnc
199- # fi
190+ if [[ -f " ${CACHE_ROOT} " /fs-manager-hippo/etc/scripts/vncserver/startvnc.sh ]] && [[ ! -f ${HIPPO_DIR} /bin/startvnc ]]; then
191+ DIR=" ${CACHE_ROOT} /fs-manager-hippo/etc/scripts/vncserver/startvnc.sh"
192+ cp " ${DIR} " ${HIPPO_DIR} /bin/startvnc
193+ proot-distro login hippo -- chmod 775 /bin/startvnc
194+ fi
195+ if [ -f " ${CACHE_ROOT} " /fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh ] && [ ! -f ${HIPPO_DIR} /bin/stopvnc ]; then
196+ DIR=" ${CACHE_ROOT} /fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh"
197+ cp " ${DIR} " ${HIPPO_DIR} /bin/stopvnc
198+ proot-distro login hippo -- chmod 775 /bin/stopvnc
199+ fi
200200 proot-distro login hippo " $@ " || warn " program exited unexpectedly..."
201201 fi
202202}
@@ -212,25 +212,25 @@ if [ $# -ge 1 ]; then
212212 --install) _lauch_or_install;;
213213 --help) __help;;
214214
215- # startvnc)
216- # if __check_for_hippo; then
217- # proot-distro login hippo -- startvnc
218- # else
219- # echo -e "This command is supposed to run after installing hippo"
220- # # echo -e "Use \e[1;32mhippo --install\e[0m install"
221- # echo -e "\e[32mError:\e[0m Hippo not found"
222- # fi
223- # ;;
215+ startvnc)
216+ if __check_for_hippo; then
217+ proot-distro login hippo --no-kill-on-exit -- startvnc
218+ else
219+ echo -e " This command is supposed to run after installing hippo"
220+ # echo -e "Use \e[1;32mhippo --install\e[0m install"
221+ echo -e " \e[32mError:\e[0m Hippo not found"
222+ fi
223+ ;;
224224
225- # stoptvnc)
226- # if __check_for_hippo; then
227- # proot-distro login hippo -- stoptvnc
228- # else
229- # echo -e "This command is supposed to run after installing hippo"
230- # # echo -e "Use \e[1;32mhippo --install\e[0m install"
231- # echo -e "\e[32mError:\e[0m Hippo not found"
232- # fi
233- # ;;
225+ stoptvnc)
226+ if __check_for_hippo; then
227+ proot-distro login hippo --no-kill-on-exit -- stoptvnc
228+ else
229+ echo -e " This command is supposed to run after installing hippo"
230+ # echo -e "Use \e[1;32mhippo --install\e[0m install"
231+ echo -e " \e[32mError:\e[0m Hippo not found"
232+ fi
233+ ;;
234234 * ) _lauch_or_install " $@ " ;;
235235 esac
236236else
0 commit comments