updated templates
This commit is contained in:
parent
8002c11f22
commit
60b0bdff25
|
|
@ -19,7 +19,7 @@
|
||||||
- iptraf-ng
|
- iptraf-ng
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- block: # debina based distros
|
- block: # debian based distros
|
||||||
- apt: name={{item}} state=latest update_cache=True
|
- apt: name={{item}} state=latest update_cache=True
|
||||||
with_items:
|
with_items:
|
||||||
- iperf3
|
- iperf3
|
||||||
|
|
|
||||||
|
|
@ -9,16 +9,36 @@ tap {{ tap_iface_name }} {{ tap_iface_ip_addr }} {{ tap_iface_ip_mask }}
|
||||||
tun {{ tun_iface_name }} {{ tun_iface_ip_addr }} {{ tun_iface_ip_mask }}
|
tun {{ tun_iface_name }} {{ tun_iface_ip_addr }} {{ tun_iface_ip_mask }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if split_tcp_sessions is defined %}
|
||||||
SPLIT_TCP_SESSIONS {{ split_tcp_sessions }}
|
SPLIT_TCP_SESSIONS {{ split_tcp_sessions }}
|
||||||
print_info {{ en_print_info }}
|
{% endif %}
|
||||||
|
{% if max_sessions_threshold is defined %}
|
||||||
MAX_SESSIONS_THRESHOLD {{ max_sessions_threshold }}
|
MAX_SESSIONS_THRESHOLD {{ max_sessions_threshold }}
|
||||||
|
{% endif %}
|
||||||
|
{% if min_sessions_threshold is defined %}
|
||||||
MIN_SESSIONS_THRESHOLD {{ min_sessions_threshold }}
|
MIN_SESSIONS_THRESHOLD {{ min_sessions_threshold }}
|
||||||
|
{% endif %}
|
||||||
|
{% if flush_sort_delay_max is defined %}
|
||||||
FLUSH_SORT_DELAY_MAX {{ flush_sort_delay_max }}
|
FLUSH_SORT_DELAY_MAX {{ flush_sort_delay_max }}
|
||||||
|
{% endif %}
|
||||||
|
{% if flush_sort_delay_min is defined %}
|
||||||
FLUSH_SORT_DELAY_MIN {{ flush_sort_delay_min }}
|
FLUSH_SORT_DELAY_MIN {{ flush_sort_delay_min }}
|
||||||
|
{% endif %}
|
||||||
|
{% if flush_sort_add_time is defined %}
|
||||||
FLUSH_SORT_ADD_TIME {{ flush_sort_add_time }}
|
FLUSH_SORT_ADD_TIME {{ flush_sort_add_time }}
|
||||||
|
{% endif %}
|
||||||
|
{% if stcp_http_srv_addr is defined and stcp_http_srv_port is defined %}
|
||||||
server_http {{ stcp_http_srv_addr }} {{ stcp_http_srv_port }}
|
server_http {{ stcp_http_srv_addr }} {{ stcp_http_srv_port }}
|
||||||
enable_peer_to_peer {{ en_peer_to_peer }}
|
{% endif %}
|
||||||
|
{% if en_peer_to_peer == true %}
|
||||||
|
enable_peer_to_peer 1
|
||||||
|
{% endif %}
|
||||||
|
{% if en_print_info == true %}
|
||||||
|
print_info 1
|
||||||
|
{% endif %}
|
||||||
|
{% if stcp_mtu_size is defined %}
|
||||||
INTERFACE_MTU {{ stcp_mtu_size }}
|
INTERFACE_MTU {{ stcp_mtu_size }}
|
||||||
|
{% endif %}
|
||||||
{% if use_auth == true %}
|
{% if use_auth == true %}
|
||||||
users {{ users_file_path }}
|
users {{ users_file_path }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
# Required-Stop: $local_fs $network $time $syslog
|
# Required-Stop: $local_fs $network $time $syslog
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Description: Sistematics Server v3 (Sep2021)
|
# Description: Sistematics Server v3
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
# Date of installation: {{ ansible_date_time.date }}
|
# Date of installation {{ ansible_date_time.date }}
|
||||||
|
|
||||||
BASE_DIR="{{ stcp_base_dir }}"
|
BASE_DIR="{{ stcp_base_dir }}"
|
||||||
STCP_INSTANCE_NAME="{{ stcp_instance_name }}"
|
STCP_INSTANCE_NAME="{{ stcp_instance_name }}"
|
||||||
|
|
@ -29,19 +29,19 @@ start() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo -e '\033[0;34m[NOTIFY]\033[0m Starting service…' >&2
|
echo -e '\033[0;34m[NOTIFY]\033[0m Starting service…' >&2
|
||||||
local CMD="$LOOP $MULTISRV $CFG $STCP_PIDFILE $EXT_IF $PORT_MIN $MODE"
|
local CMD="$LOOP $MULTISRV $CFG $STCP_PIDFILE $EXT_IF $PORT_MIN $MODE &>\"$DAEMON_LOGFILE\" & echo \$!"
|
||||||
su -c "$CMD" $RUNAS > $DAEMON_LOGFILE 2>&1 &
|
su -s /bin/sh -c "$CMD" $RUNAS > $DAEMON_PIDFILE 2>&1 &
|
||||||
echo $! > $DAEMON_PIDFILE
|
|
||||||
echo -e '\033[0;32m[OK]\033[0m Service started' >&2
|
echo -e '\033[0;32m[OK]\033[0m Service started' >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
if [ ! -f $DAEMON_PIDFILE ] || ! kill -0 $(cat $DAEMON_PIDFILE); then
|
if [ ! -f $DAEMON_PIDFILE ] || ! kill -0 $(cat $DAEMON_PIDFILE); then
|
||||||
echo -e '\033[1;33m[WARN]\033[0m Service not running' >&2
|
echo -e '\033[1;33m[WARN]\033[0m Service not running' >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo -e '\033[0;34m[NOTIFY]\033[0m Stopping service…' >&2
|
echo -e '\033[0;34m[NOTIFY]\033[0m Stopping service…' >&2
|
||||||
pkill -15 -P $(cat $DAEMON_PIDFILE) && rm -f $DAEMON_PIDFILE
|
kill $(cat $DAEMON_PIDFILE) && rm -f $DAEMON_PIDFILE
|
||||||
|
sleep 5
|
||||||
echo -e '\033[0;32m[OK]\033[0m Service stopped' >&2
|
echo -e '\033[0;32m[OK]\033[0m Service stopped' >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ stcp_mode: tun
|
||||||
stcp_runas: root
|
stcp_runas: root
|
||||||
use_auth: no
|
use_auth: no
|
||||||
use_client_logging: yes
|
use_client_logging: yes
|
||||||
|
|
||||||
#stcp_tuntaps
|
#stcp_tuntaps
|
||||||
en_tap_iface: no
|
en_tap_iface: no
|
||||||
tap_iface_name: 'tap_{{ stcp_instance_name }}'
|
tap_iface_name: 'tap_{{ stcp_instance_name }}'
|
||||||
|
|
@ -19,5 +20,4 @@ tap_iface_ip_mask: 255.255.255.0
|
||||||
en_tun_iface: yes
|
en_tun_iface: yes
|
||||||
tun_iface_name: 'tun_{{ stcp_instance_name }}'
|
tun_iface_name: 'tun_{{ stcp_instance_name }}'
|
||||||
tun_iface_ip_addr: 10.11.1.1
|
tun_iface_ip_addr: 10.11.1.1
|
||||||
tun_iface_ip_mask: 255.255.255.0
|
tun_iface_ip_mask: 255.255.255.0
|
||||||
|
|
||||||
Loading…
Reference in New Issue