Skip to content
Snippets Groups Projects
Commit d4fb8b5e authored by cremesk's avatar cremesk
Browse files

change install_dir

parent 0cd9830b
No related branches found
No related tags found
No related merge requests found
......@@ -94,8 +94,8 @@ installiert, Files kopiert und am Ende noch einige Tools compiliert werden müss
git:
```
git clone https://github.com/cremesk/ffdd-server.git /opt/ffdd-server
cd /opt/ffdd-server && ./init-server.sh
git clone https://github.com/cremesk/ffdd-server.git /srv/ffdd-server
cd /srv/ffdd-server && ./init-server.sh
```
Alternative Installations Möglichkeiten:
......@@ -141,7 +141,10 @@ Gibt es hier keinerlei Fehler mehr sollte der Server einmal sauber neugestartet
**Optional:**<br/>
* /etc/firewall.user<br/>
Kann verwendet werden um eigene Firewallregeln (iptables) zu definieren. Diese werden in /etc/init.d/S41firewall eingebunden und automatisch von salt mitgeladen.
Kann verwendet werden um eigene Firewallregeln (iptables) zu definieren. Diese werden in '/etc/init.d/S41firewall' eingebunden und automatisch von salt mitgeladen.
* Änderung des Installations Path<br/>
Dies benötigt eine Änderung der Variable "install_dir" in der '/etc/nvram.conf' sowie in 'init_server.sh' (/srv/ffdd-server)!
Wichig
----
......
......@@ -12,7 +12,7 @@
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
INSTALL_DIR="/opt/ffdd-server"
INSTALL_DIR="/srv/ffdd-server"
#
# -- RUN Installation --
......@@ -84,12 +84,27 @@ if [ ! -f /etc/nvram.conf ]; then
printf '\n### Create New /etc/nvram.conf and /usr/local/bin/nvram\n';
cp -v "$INSTALL_DIR"/salt/freifunk/base/nvram/etc/nvram.conf /etc/nvram.conf
# for initial nvram autosetup
# initial nvram
cp -v "$INSTALL_DIR"/salt/freifunk/base/nvram/usr/local/bin/nvram /usr/local/bin/
else
printf '\n### /etc/nvram.conf exists.\n';
printf '### Create /etc/nvram.conf.default & /etc/nvram.conf.diff\n';
NOTICE="$(printf '\n# Notice: Please check /etc/nvram.conf.diff ! And fix your config!\n')"
NOTICE="$(printf '\n# Notice: Please check config options in /etc/nvram.conf & /etc/nvram.conf.diff !\n')"
# check new options are set
au="$(grep -c autoupdate < /etc/nvram.conf)"
insdir="$(grep -c install_dir < /etc/nvram.conf)"
# check autoupdate
if [ "$au" -lt 1 ]; then
sed -i '1s/^/\nautoupdate=1\n\n/' /etc/nvram.conf
sed -i '1s/^/\n# set autoupdate (0=off 1=on)/' /etc/nvram.conf
fi
# check install path
if [ "$insdir" -lt 1 ]; then
{ echo "install_dir=$INSTALL_DIR"; cat /etc/nvram.conf; } >/etc/nvram.conf.new
mv /etc/nvram.conf.new /etc/nvram.conf
fi
cp -v "$INSTALL_DIR"/salt/freifunk/base/nvram/etc/nvram.conf /etc/nvram.conf.default
diff /etc/nvram.conf.default /etc/nvram.conf > /etc/nvram.conf.diff
......
install_dir=/opt/ffdd-server
install_dir=/srv/ffdd-server
# set autoupdate (0=off/1=on)
# set autoupdate (0=off 1=on)
autoupdate=1
# Vserver do not get a node number via registirator and define manually. This ensures that serveral vserver do not change
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment