Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 46e2432f authored by Paul Lambert's avatar Paul Lambert
Browse files

added headers to sh files

parent ea573161
#!/bin/bash
# -------------------------------------------------
# Description: add organization ID into URL
# List Command: x
# Usage: runned by get_devices.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# Parameters
if [[ $# -ne 2 ]] ; then
echo "Usage: $0 DID OID"
......
......@@ -3,6 +3,17 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# -------------------------------------------------
# Description: Delete unnecessary files
# List Command: x
# Usage: executed by ./clean.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# DATA REPOSITORY
DATA_CONFIG_FOLDER="data/configuration/"
DATA_ORG_FOLDER="data/organizations/"
......
......@@ -3,10 +3,6 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Get the detail of a getaway
# ------------------------------------------------
# Parameters
if [[ $# -ne 2 ]] ; then
echo "Usage: $0 JWT GWID"
......
......@@ -5,7 +5,6 @@
# List Command: x
# Usage: runned by get_gateways.sh (à détailler)
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# Since: 09/09/2560 (DD/MM/YYYY)
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
......
......@@ -5,7 +5,6 @@
# List Command: x
# Usage: runned by get_gateways.sh (à détailler)
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# Since: 09/09/2560 (DD/MM/YYYY)
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
......
......@@ -3,9 +3,16 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Generate the reports
# ------------------------------------------------
# -------------------------------------------------
# Description: Generate gateways and devices reports
# List Command: x
# Usage: execute ./generate_reports.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# DATA REPOSITORY
DATA_CONFIG_FOLDER="data/configuration/"
......
......@@ -3,9 +3,16 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Get applications
# ------------------------------------------------
# -------------------------------------------------
# Description: Get applications
# List Command: x
# Usage: runned by get_applications.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# Parameters
if [[ $# -ne 2 ]] ; then
......
......@@ -3,9 +3,16 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Get devices
# ------------------------------------------------
# -------------------------------------------------
# Description: Get devices
# List Command: x
# Usage: runned by generate_reports.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# Parameters
if [[ $# -ne 1 ]] ; then
......
......@@ -3,9 +3,16 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Get the detail of a getaway
# ------------------------------------------------
# -------------------------------------------------
# Description: Get the detail of a gateway
# List Command: x
# Usage: runned by get_gateways.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# Parameters
if [[ $# -ne 2 ]] ; then
......
......@@ -3,9 +3,16 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Get the stats of a get gateway
# ------------------------------------------------
# -------------------------------------------------
# Description: Get the stats of a gateway
# List Command: x
# Usage: runned by get_gateways.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# Parameters
if [[ $# -ne 3 ]] ; then
......
......@@ -3,9 +3,16 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Get getaways
# ------------------------------------------------
# -------------------------------------------------
# Description: Get gateways
# List Command: x
# Usage: runned by generate_reports.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# Parameters
if [[ $# -ne 1 ]] ; then
......
#!/bin/bash
# -------------------------------------------------
# Description: search for changement of devices state and update HTML
# List Command: x
# Usage: runned by get_devices.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
TODAY="$(date +"%Y-%m-%d")"
# DATA REPOSITORY
......
#!/bin/bash
# -------------------------------------------------
# Description: Search for changement of gateways states and updtae HTML
# List Command: x
# Usage: runned by get_gateways.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
TODAY="$(date +"%Y-%m-%d")"
# DATA REPOSITORY
......@@ -14,10 +25,7 @@ id=($ids)
dates=$(jq --raw-output ".result[] | .lastSeenAt" ${DATA_GAT_FOLDER}.gateways.json)
date=()
date=($dates)
state=()
full_date=()
d=()
for (( i=0; i<${#date[@]}; i++ ))
state=()nerate_reports i++ ))
do
if [[ ${date[$i]} == "null" ]]
then
......
......@@ -3,9 +3,16 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# ------------------------------------------------
# Get organizations
# ------------------------------------------------
# -------------------------------------------------
# Description: Get organizations
# List Command: x
# Usage: runned by generate_reports.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# Parameters
if [[ $# -ne 1 ]] ; then
......
......@@ -3,6 +3,17 @@
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2021
# -------------------------------------------------
# Description: Send mails containing reports
# List Command: x
# Usage: should be runned by generate_reports.sh
# Create by: CampusIoT Dev Team, 2021 - Copyright (C) CampusIoT, - All Rights Reserved
# -------------------------------------------------
# Version: 1.0
# -------------------------------------------------
# Bug:
# -------------------------------------------------
# crontab entry
# TODO /bin/bash
......
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