checkserver fix (for using systemctl); install.sh small refactoring; openvpn some dists bugfix (systemctl with full config name)

pull/1/head
bedefaced 8 years ago
parent 1d4c400337
commit 24f0c4ae2a
  1. 4
      ipsec/checkserver.sh
  2. 10
      ipsec/install.sh
  3. 2
      openvpn/checkserver.sh
  4. 20
      openvpn/install.sh
  5. 2
      pptp/checkserver.sh
  6. 10
      pptp/install.sh

@ -3,11 +3,11 @@
RET=$(pgrep xl2tpd)
if [ $? -eq 1 ]; then
/etc/init.d/xl2tpd restart
systemctl restart xl2tpd
fi
RET=$(pgrep starter)
if [ $? -eq 1 ]; then
/etc/init.d/strongswan restart
systemctl restart strongswan
fi

@ -10,7 +10,7 @@ fi
echo
echo "Installing strongSwan and xl2tp server..."
apt-get install strongswan xl2tpd cron iptables procps
apt-get -y install strongswan xl2tpd cron iptables procps net-tools
echo
echo "Configuring routing..."
@ -39,15 +39,15 @@ echo
echo "Configuring PSK..."
$DIR/psk.sh
echo
echo "Configuring VPN users..."
$DIR/adduser.sh
echo
echo "Adding cron jobs..."
yes | cp -rf $DIR/checkserver.sh $CHECKSERVER
$DIR/autostart.sh
echo
echo "Configuring VPN users..."
$DIR/adduser.sh
echo
echo "Starting strongSwan and xl2tp..."
service xl2tpd restart

@ -3,5 +3,5 @@
RET=$(pgrep openvpn)
if [ $? -eq 1 ]; then
/etc/init.d/openvpn restart
systemctl restart openvpn@openvpn-server
fi

@ -12,7 +12,7 @@ fi
echo
echo "Installing OpenVPN..."
apt-get install openvpn easy-rsa cron iptables procps
apt-get -y install openvpn easy-rsa cron iptables procps net-tools
echo
echo "Configuring routing..."
@ -34,6 +34,10 @@ echo
echo "Configuring DNS parameters..."
$DIR/dns.sh
# workaround: Debian's openssl version is not compatible with easy-rsa
# using openssl-1.0.0.cnf if openssl.cnf not exists
cp -n /etc/openvpn/easy-rsa/openssl-1.0.0.cnf /etc/openvpn/easy-rsa/openssl.cnf
echo
echo "Creating server keys..."
make-cadir $CADIR
@ -45,21 +49,21 @@ source ./vars
./build-dh
openvpn --genkey --secret ta.key
cd $STARTDIR
echo
echo "Configuring VPN users..."
$DIR/adduser.sh
echo
echo "Adding cron jobs..."
yes | cp -rf $DIR/checkserver.sh $CHECKSERVER
$DIR/autostart.sh
cd $STARTDIR
echo
echo "Configuring VPN users..."
$DIR/adduser.sh
echo
echo "Starting OpenVPN..."
systemctl enable openvpn
service openvpn restart
systemctl -f enable openvpn@openvpn-server
systemctl restart openvpn@openvpn-server
echo
echo "Installation script completed!"

@ -3,5 +3,5 @@
RET=$(pgrep pptpd)
if [ $? -eq 1 ]; then
/etc/init.d/pptpd restart
systemctl restart pptpd
fi

@ -10,15 +10,11 @@ fi
echo
echo "Installing PPTP server..."
apt-get install pptpd cron iptables procps
apt-get -y install pptpd cron iptables procps net-tools
ADDUSER="no"
ANSUSER="yes"
echo
echo "Configuring VPN users..."
$DIR/adduser.sh
echo
echo "Configuring iptables firewall..."
$DIR/iptables-setup.sh
@ -44,6 +40,10 @@ echo "Adding cron jobs..."
yes | cp -rf $DIR/checkserver.sh $CHECKSERVER
$DIR/autostart.sh
echo
echo "Configuring VPN users..."
$DIR/adduser.sh
echo
echo "Starting pptpd..."
service pptpd restart

Loading…
Cancel
Save