Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2862  / 3 Years ago, sun, september 12, 2021, 2:17:34

I'm running Ubuntu on my Samsung ARM Chromebook in chroot via crouton. I'm trying to run Cisco AnyConnect VPN in Ubuntu and ran into an issue. It installs but the daemon won't start. I found a description of the issue here: https://github.com/dnschneid/crouton/issues/15



So I found the shell script for AnyConnect in /etc/init.d but I'm not smart enough to figure out how to run these commands manually. I'm hoping someone can point me in the right direction.



Here are the contents of the vpnagentd_init file:



#!/bin/sh
#
# chkconfig: 345 85 25
# description: vpnagentd is used for managing the cisco vpn client datapath.
# processname: vpnagentd



# Source function library.
if [ -e "/etc/init.d/functions" ]; then
. /etc/init.d/functions
fi

RETVAL=0

start() {
# If TUN isn't supported by the kernel, try loading the module...
/sbin/lsmod | grep tun > /dev/null
if [ $? -ne 0 ]; then
/sbin/modprobe tun > /dev/null 2> /dev/null
if [ $? -ne 0 ]; then
# check for /dev/net/tun
[ -c "/dev/net/tun" ] || echo Warning: Unable to verify that the tun/tap driver is loaded. Contact your system administrator for assistance.
fi
fi

echo -n $"Starting up Cisco VPN daemon "
/opt/cisco/vpn/bin/vpnagentd
RETVAL=$?
echo
return $RETVAL
}

stop() {
echo -n $"Shutting down Cisco VPN daemon "
killall vpnagentd
RETVAL=$?
echo
return $RETVAL
}

dostatus() {
status vpnagentd
}

restart() {
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
dostatus
;;
*)
echo $"Usage: vpnagent {start|stop|restart|status}"
exit 1
esac

exit $RETVAL

More From » vpn

 Answers
6

As an example, to run the 'start daemon' section, copy the contents of the file between "start(){" and "}" and put it in a text file startScript (as ane example). Use chmod+x startScript to make the script executable, then use ./startScript to run it. The same can be done for the stop and status sections if desired.


[#32424] Monday, September 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aslity

Total Points: 336
Total Questions: 133
Total Answers: 98

Location: Zimbabwe
Member since Thu, Jul 21, 2022
2 Years ago
aslity questions
Sat, Apr 22, 23, 23:22, 1 Year ago
Wed, Oct 27, 21, 06:19, 3 Years ago
Sun, Oct 3, 21, 05:33, 3 Years ago
Fri, Jul 1, 22, 17:16, 2 Years ago
;