Skip to content
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

Remove autostart from debian postinstall trigger #37

Open
wants to merge 1 commit into
base: master
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
26 changes: 11 additions & 15 deletions logigsk-buildpackage
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -288,20 +288,16 @@ case "$1" in
sudo ln -sf /usr/share/logigsk/LogiGSK.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo ln -sf /usr/share/logigsk/99_LogiGSK /etc/pm/sleep.d/
USER=`who | grep ':0' | grep -o '^\w*' | head -n1`
if [ "$(id -u $USER)" != "0" ]; then
HOME=`eval echo ~$USER`
if [ -d "$HOME/.config/autostart/" ]; then
sudo -u $USER ln -sf /usr/share/logigsk/LogiGSK.sh "$HOME/.config/autostart/LogiGSK.sh"
else
echo "failed to setup LogiGSK service startup file in autostart, please refere to website for more details."
fi
sudo -H -u $USER "/usr/share/logigsk/LogiGSK" start
exit 0
else
echo "failed to setup LogiGSK service startup file in autostart, please refere to website for more details."
exit 1
fi
echo
echo "To automatically start this service on login for all users, run (as root):"
echo '# ln -sf /usr/share/logigsk/LogiGSK.sh /etc/xdg/autostart/LogiGSK.sh'
echo
echo "To automatically start this service on login for a single user, run (as that user):"
echo '$ ln -sf /usr/share/logigsk/LogiGSK.sh $HOME/.config/autostart/LogiGSK.sh'
echo
echo "To manually start this service for use by a user, run (as that user):"
echo '$ /usr/share/logigsk/LogiGSK start'
echo
;;

*)
Expand Down Expand Up @@ -597,4 +593,4 @@ case "$1" in
esac

rm -r $TEMP_DIR/debian
rm -r $TEMP_DIR/tmpscripts
rm -r $TEMP_DIR/tmpscripts