0

I have a script call startVPN.sh that I have put in the .profile file. If I run bash .profile, the script runs but it does not run at login.

How do I fix this so that the VPN starts automatically at login?

Script

#!/bin/bash
nmcli con up id OSG

.profile


# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
~/startVPN.sh

0

You must log in to answer this question.

Browse other questions tagged .