diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2020-04-16 14:49:59 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2020-04-16 14:49:59 +0000 |
commit | ae5215e025daae99b3ebfe22cd65310eebbdfc70 (patch) | |
tree | 95bc399a7e716d1a06cd630891cabc9b67eedc7b /security/tinc | |
parent | bc119880610cc9f9b32a3d34644e515755fd6575 (diff) | |
download | ports-ae5215e025daae99b3ebfe22cd65310eebbdfc70.tar.gz ports-ae5215e025daae99b3ebfe22cd65310eebbdfc70.zip |
- cleanup rc.d script
Notes
Notes:
svn path=/head/; revision=531850
Diffstat (limited to 'security/tinc')
-rw-r--r-- | security/tinc/Makefile | 2 | ||||
-rw-r--r-- | security/tinc/files/tincd.in | 22 |
2 files changed, 15 insertions, 9 deletions
diff --git a/security/tinc/Makefile b/security/tinc/Makefile index 9413cf2df4b7..f7ceb7162a88 100644 --- a/security/tinc/Makefile +++ b/security/tinc/Makefile @@ -3,7 +3,7 @@ PORTNAME= tinc PORTVERSION= 1.0.36 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security net-vpn MASTER_SITES= https://www.tinc-vpn.org/packages/ \ http://www.tinc-vpn.org/packages/ diff --git a/security/tinc/files/tincd.in b/security/tinc/files/tincd.in index 4a7c965cd815..c3f1e7acb9c3 100644 --- a/security/tinc/files/tincd.in +++ b/security/tinc/files/tincd.in @@ -1,10 +1,11 @@ #!/bin/sh - +# # $FreeBSD$ # # PROVIDE: tincd # REQUIRE: ipfilter FILESYSTEMS sysctl netif # BEFORE: SERVERS routing +# KEYWORD: shutdown # # Define these tincd_* variables in one of these files: # /etc/rc.conf @@ -20,12 +21,15 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE -tincd_enable=${tincd_enable:-"NO"} - . /etc/rc.subr name="tincd" +desc="Tinc VPN Daemon" rcvar="tincd_enable" + +load_rc_config $name + +: ${tincd_enable:="NO"} command="%%PREFIX%%/sbin/tincd" start_cmd="tincd_start" stop_cmd="tincd_stop" @@ -35,8 +39,6 @@ extra_commands="reload" procname=${command:-tincd} ldconfig_command="/sbin/ldconfig" -load_rc_config $name - tincd_start() { ${ldconfig_command} -elf -m %%LOCALBASE%%/lib @@ -51,12 +53,13 @@ tincd_start() $command -n $cfg $tincd_flags done fi -# code deliberately borrowed from /etc/rc.d/netif + # code deliberately borrowed from /etc/rc.d/netif if [ -f /etc/rc.d/ipfilter ] ; then # Resync ipfilter /etc/rc.d/ipfilter quietresync fi } + tincd_stop() { if test -z "${tincd_cfg}" @@ -72,6 +75,7 @@ tincd_stop() fi wait_for_pids $rc_pid } + tincd_reload() { if test -z "${tincd_cfg}" @@ -86,7 +90,9 @@ tincd_reload() done fi } -tincd_status_network() { + +tincd_status_network() +{ rc_pid=$(check_pidfile "$pidfile" "$_procname" "$command_interpreter") if [ -n "$rc_pid" ]; then echo "${name} for ${cfg} is running as pid $rc_pid." @@ -95,6 +101,7 @@ tincd_status_network() { return 1 fi } + tincd_status() { if test -z "${tincd_cfg}" @@ -112,4 +119,3 @@ tincd_status() } run_rc_command "$1" -# eof |