1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 12:23:59 +02:00
openwrt-packages/net/softethervpn5/files/vpnclient.init
Andy Walsh ccd45a4959 softethervpn5: switch to git (2019-02-27)
* switch to git, until we can consume manual created source releases again
* Fix compilation without OpenSSL ENGINE
* remove unnecessary stop_service() triggers

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
2019-03-01 12:16:05 +01:00

23 lines
818 B
Bash

#!/bin/sh /etc/rc.common
START=92
USE_PROCD=1
start_service(){
logger -t 'softethervpn5' "Starting softether client service."
[ -d /var/softethervpn ] || mkdir -p -m 0775 /var/softethervpn
[ -f /var/softethervpn/hamcore.se2 ] || ln -sf /usr/libexec/softethervpn/hamcore.se2 /var/softethervpn/
[ -f /var/softethervpn/lang.config ] || ln -sf /usr/libexec/softethervpn/lang.config /var/softethervpn/
[ -f /var/softethervpn/vpnclient ] || ln -sf /usr/libexec/softethervpn/vpnclient /var/softethervpn/
[ -f /var/softethervpn/vpn_client.config ] || ln -sf /usr/libexec/softethervpn/vpn_client.config /var/softethervpn/
procd_open_instance
procd_set_param env LANG=en_US.UTF-8
procd_set_param command /var/softethervpn/vpnclient start --foreground
procd_set_param respawn
procd_close_instance
}