shell_exec("docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd testUserName");
is working but it needs password in second step is there anyway to add new user by one command?
echo password and pipe it.
Does not test the bellow command but might work with some changes.
docker exec -ti ocserv ocpasswd -c echo 'password' | /etc/ocserv/ocpasswd testUserName
shell_exec("docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd testUserName"); is working but it needs password in second step is there anyway to add new user by one command?