Skip to content


edgerouter copy restart

#edgerouter

when upgrading the edgerouter lite work on the following
right after the upgrade
apt-get update
apt-get install rsync iftop iptraf vnstat nano

webvnstat config:
ln -s /config/newy/vnstat /var/www/htdocs/stat

Verify the first line is in the /etc/lighttpd/lighttpd.conf file after the upgrade

url.rewrite-once = (
“^/stat/(.*)” => “/stat/$1”,
“^(/(lib|media|ws|tests)/.*)” => “$0”,
“^/([^\?]+)(\?(.*))?$” => “/index.php/$1?$3”
)

restart lighttpd:
sudo kill -SIGTERM $(cat /var/run/lighttpd.pid)
sudo /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
verify https://gw5.newy.org/stat/index.php

contents of /config/scripts/firstboot.d/postinstall.sh

#!/bin/bash

doneit=’/var/lib/my_packages’
packages=’rsync iftop iptraf vnstat nano’

if [ -e $doneit ]; then
exit 0;
fi

#copy old vnstat data
cp -a /root.dev/w.o/var/lib/vnstat /var/lib/

apt-get update
apt-get install -y $packages
if [ $? == 0 ]; then
echo package install successful
touch $doneit
else
echo package install failed
fi
exit 0

#restart vnstat
service vnstat restart

Posted in Uncategorized.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

You must be logged in to post a comment.