Page 1 of 1

[SOLVED] Linux Deploy SoftEther Init Script Issue

Posted: Tue Aug 01, 2017 3:12 pm
by cmd wh0ami
I installed SoftEther server on a android phone running CentOS 7 on Linux Deploy and Busy Box. I'm connecting to the cellular ip through the vpn tunnel to use the cellular public ip.

Android 4.4.2
Architecture: armv71
Kernel: 3.4.0+
Memory: 70/415 MB
Swap: 52/110 MB
SELinux: yes
Loop Device: yes
Support binfmt_misc: no
Supported FS: ext2 ext3 extd fuseblk vfat
Installed System: CentOS 7

I used the start up script example:

#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

I set Linux to start up on a 30 second delay when the phone is powered on. This works fine. But SoftEther will not start in service mode. I have to manually start SoftEther through the cmd line through ssh.

I ran the vpncmd vpn tools check and all checks pass.

When I installed CentOS 7, development tools, gcc, and libpcap on linux deploy it was missing packages. I had to install wget, make, and openssl-dev manually.

I believe it is missing somthing preventing SoftEther for starting on start up.

Re: What Could Be Missing Preventing SoftEther From Auto Sta

Posted: Wed Aug 02, 2017 6:41 pm
by cmd wh0ami
I switched distros to Debian Stretch. I realized the problem was I didnt have and couldnt get chkconfig.

I found a replacement but dont know how to use it. sysv-rc-conf

If anyone could tell me how to use this to auto start softether with this?

I'm going to try to figure it out with trial and error.

Re: What Could Be Missing Preventing SoftEther From Auto Sta

Posted: Thu Aug 03, 2017 2:44 pm
by cmd wh0ami
Now I'm using a different start up script for Debian I found on github.

#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable Softether by daemon.
### END INIT INFO
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0


when I run cmd:
sudo update-rc.d vpnserver defaults

I get no errors. When I check rc.d by running cmd:
ls /etc/rc*.d

I can see SoftEther has start for 2 3 4 5 and kill for 0 1 6

It is still not starting at boot. What am I missing? I've set this up to work on a VPS, why isnt it working on this Android phone running Linux Deploy? Could it have to do with Linux Deploy being a chroot environment?

Re: What Could Be Missing Preventing SoftEther From Auto Sta

Posted: Sun Aug 06, 2017 3:35 am
by cmd wh0ami
[SOLVED]

Linux Deploy has a Init setting. It must be enabled.

Init: enabled

Init system: sysv

Init settings:

Init level: 3

Init user: root

Async: enabled
run the processes asynchronously