Skip to content

fix script: add a timeout for getevent. #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if [ ! -f "$SERVICE_DIR/tailscaled_service.sh" ]; then
mv -f "$MODPATH/service.sh" "$SERVICE_DIR/tailscaled_service.sh"
break
fi
getevent -lc 1 2>&1 | grep KEY_VOLUME > $TMPDIR/events
timeout 1s getevent -lc 1 2>&1 | grep KEY_VOLUME > $TMPDIR/events
if $(cat $TMPDIR/events | grep -q KEY_VOLUMEUP) ; then
ui_print "- [Yes] Move Module Scripts to General Scripts."
mv -f "$MODPATH/service.sh" "$SERVICE_DIR/tailscaled_service.sh"
Expand All @@ -110,4 +110,4 @@ ui_print " su -c 'tailscale login'"
ui_print " su -c 'tailscale set --accept-dns=false'"
ui_print "- Read the README.md"
ui_print "- Logs :"
ui_print " '$CUSTOM_DIR/run/'"
ui_print " '$CUSTOM_DIR/run/'"