Using mint you need to deal with systemd. I know, I just made your day, right?
In effect you need to create a service to run once after the network is up. I had to do something similar recently and bludgeoned it into working so I'll show you what I did that seems to work. Someone who actually knows systemd may tell you something else. If so you probably need to listen to them but this did work for me.
My problem was getting some rules loaded in the firewall. I wrote a script to load them, and then had the script run once after the network was up. You will need to set the Description to something that makes sense for you and the ExecStart to the command line for you script. Be careful to use complete paths; do not expect the system to find the script without a complete path. The $PATH the computer uses will not be what you expect, if anything.
Put the service file in /etc/systemd/system and set the permissions to 644 with root as the owner. Then "sudo systemctl daemon-reload" and "sudo systemctl enable <service name>". That should do it, or at least come close.
Code:
[Unit]
Description=xxxxxxxxxxxx
After=network-online
[Service]
Type=oneshot
ExecStart=xxx/xxx/xxx
[Install]
WantedBy=network-online.target
Edit: I forgot to point out that the filename needs to be <something>.service