Running client-connect script as another user?
Posted: Fri Nov 16, 2018 2:15 pm
I try to run a script when user is connected. In OpenVPN server configuration I have:
The problem is, that this script is running as user nobody, but I would run it as some other user. For instance, I have Signal-CLI application installed in my home directory. I tried to run it like this (content of /etc/openvpn/notify.sh), but this is not really working:
Any idea how to solve this?
Code: Select all
script-security 2
client-connect /etc/openvpn/notify.sh
client-disconnect /etc/openvpn/notify.sh
Code: Select all
sudo -u matej /home/matej/signal-cli/bin/signal-cli -u +3**** send -m "USER CONNECTED" +3***