I want to execute a script that starts synergy
whenever my laptop wifi cards hooks up to a network (for now any, i'll add a filter later). So I wrote a script `/etc/network/if-up.d/999startsynergy' that looks like:
#!/bin/bash
########################################################################
# script to start synergy
# for remote mouse & keyboard control
# from my Desktop PC & work laptop
# script by: Ron Eggler 11/05/2016
#
########################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
########################################################################
#
# Configuration:
#
host1='DesktopHome'
host2='GEnotebook'
bin='/usr/bin/synergyc'
case $1 in
up)
sleep 5
$bin $host1
$bin $host2
;;
*) exit 0
esac
exit 0
but nothing happens when I disable and re-enable my network card but if I execute ./999startsynergy up
manually, it works just fine! I've also tried with & without the 5 second delay - same thing... any idea what might be going on here?