Commit f9e93aa6 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slapos-start now use /etc/opt/slapos/ as default directory

parent f10024f7
......@@ -5,12 +5,7 @@ IPV6CHECK=ipv6.google.com
IPV4CHECK=google.com
IPV6WAITTIME=5
# Execute slapformat
if [ -f /etc/opt/slapos/slapos.cfg ] ; then
SLAPOS_CONFIGURATION=/etc/opt/slapos
else
SLAPOS_CONFIGURATION=/etc/slapos
fi
SLAPOS_CONFIGURATION=/etc/opt/slapos/
echo "Starting slap script"
......
......@@ -111,14 +111,16 @@ done
repo=`egrep ^certificate_repository_path $SLAPOS_CONFIGURATION/slapos.cfg | sed 's/^certificate_repository_path.*= *//'`
mkdir -v -p -m 0755 $repo
# software detected, ready to run
# Set up cron
# Fix path in case of old config:
SLAPOS_GOOD_CONFIGURATION=/etc/opt/slapos/
if [ $SLAPOS_GOOD_CONFIGURATION != $SLAPOS_CONFIGURATION ]; then
sed -i "s|$SLAPOS_GOOD_CONFIGURATION|$SLAPOS_CONFIGURATION|g" /etc/cron.d/slapos-node
sed -i "s|$SLAPOS_GOOD_CONFIGURATION|$SLAPOS_CONFIGURATION|g" /usr/sbin/slapos-start
# Set up cron
# Remove default route for ipv6 in case of openvpn-needed
echo """# BEWARE: This file will be automatically regenerated on each boot
SHELL=/bin/sh
......@@ -148,6 +150,7 @@ sysctl -w \
net.ipv6.neigh.default.gc_thresh2=1024 \
net.ipv6.neigh.default.gc_thresh3=2048
# software detected, ready to run
systemctl enable slapos-node.service
systemctl start slapos-node.service
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment