Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ggmartins committed Sep 24, 2021
1 parent 5fa7dd7 commit c715abd
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ celerybeat.pid

# Environments
.env
.env.*
.venv
#env/ gitignore inside
venv/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Please use the _unmanaged_ installation with direct influxdb data ingestion if y
targets = ["server:33001"]
...
```
5. Create .env file with server credentials <b>`sudo vim /etc/nm-exp-active-netrics/.env`</b>:
5. Create .env.netrics file with server credentials <b>`sudo vim /etc/nm-exp-active-netrics/.env.netrics`</b>:
<pre>
INFLUXDB_SERVER=
INFLUXDB_PORT=
Expand Down
4 changes: 2 additions & 2 deletions etc/init.d/nm-exp-active-netrics
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ fi

start_nma() {
upload=""
if [ -f /etc/nm-exp-active-netrics/.env ];then
if [ -f /etc/nm-exp-active-netrics/.env.netrics ];then
upload="-u"
echo "INFO: /etc/nm-exp-active-netrics/.env present, using -u (upload flag)"
echo "INFO: /etc/nm-exp-active-netrics/.env.netrics present, using -u (upload flag)"
fi
echo "Installing nm-exp-active-netrics in crontab (/etc/cron.d/cron-nm-exp-active-netrics)..."

Expand Down
2 changes: 1 addition & 1 deletion package/deb/nm-exp-active-netrics/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: nm-exp-active-netrics
Version: 0.1.11
Version: 1.0.0
Section: custom
Priority: optional
Architecture: arm64
Expand Down
17 changes: 7 additions & 10 deletions package/deb/nm-exp-active-netrics/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ usermod -a -G wireshark netrics
echo "INFO: Please enable non-root users to run tshark wireshark. Eg.:"
echo "INFO: \"$ yes | DEBIAN_FRONTEND=teletype dpkg-reconfigure wireshark-common\""

if [ -f /etc/nm-exp-active-netrics/.env ];then
chown netrics:netrics /etc/nm-exp-active-netrics/.env
fi

# uncomment here to stash archive/pending
#if [ -d /var/nm/ ];then
# mv /var/nm /var/nm.backup.$(date +"%Y%m%d")
#fi
### uncomment here to stash archive/pending
## if [ -d /var/nm/ ];then
## mv /var/nm /var/nm.backup.$(date +"%Y%m%d")
## fi

mkdir -p /var/nm/

if [ -f /etc/nm-exp-active-netrics/.env ];then
chown netrics:netrics /etc/nm-exp-active-netrics/.env
if [ -f /etc/nm-exp-active-netrics/.env.netrics ];then
chown netrics:netrics /etc/nm-exp-active-netrics/.env.netrics
fi

chown netrics:netrics /usr/local/src/nm-exp-active-netrics/ -R
chmod +x /etc/init.d/nm-exp-active-netrics
update-rc.d nm-exp-active-netrics defaults
Expand Down
8 changes: 4 additions & 4 deletions scripts/make_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ update-rc.d nm-exp-active-netrics defaults
cd -

if [ -f env/.env ];then
echo "INFO: env detected. copying env/.env /etc/nm-exp-active-netrics/.env ..."
chmod go-rw env/.env
cp env/.env /etc/nm-exp-active-netrics/.env
echo "INFO: env detected. copying env/.env.netrics /etc/nm-exp-active-netrics/.env.netrics ..."
chmod go-rw env/.env.netrics
cp env/.env.netrics /etc/nm-exp-active-netrics/.env.netrics
else
echo "INFO: NO env detected."
fi
Expand All @@ -65,5 +65,5 @@ if [ ! -d "/var/nm" ]; then
chown netrics:netrics /var/nm -R
fi

chown netrics:netrics /etc/nm-exp-active-netrics/.env
chown netrics:netrics /etc/nm-exp-active-netrics/.env.netrics
chown netrics:netrics /usr/local/src/nm-exp-active-netrics/ -R
5 changes: 3 additions & 2 deletions src/netrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

#TODO: move this to setup.py
__name__ = "nm-exp-active-netrics"
__version__ = "0.1.11"
__author__ = "Kyle-MacMillan, James Saxon, Guilherme Martins, Nick Feamster"
__version__ = "1.0.0"
__author__ = "Kyle-MacMillan, James Saxon, Guilherme Martins,"\
"Marc Richardson, Nick Feamster"

#Used for Annotations
class keyvalue(argparse.Action):
Expand Down
2 changes: 1 addition & 1 deletion src/nmexpactive/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
projectname = "nm-exp-active-{0}".format(project)
EXP = Path(projectname)
ETC = Path("/etc") / EXP
ETC_ENV = ETC / ".env"
ETC_ENV = ETC / ".env.netrics"
VAR_NM = Path("/var/nm/")
VAR = Path("/var/nm/") / EXP
VAR_LOG = VAR / "log"
Expand Down

0 comments on commit c715abd

Please sign in to comment.