-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix visualisation and remove phy from config
- Alfred now start with own init.d - all configs done with based on the wifi interface name and phy is detected. Jira-Id: SCDI-43 Signed-off-by: Mika Joenpera <[email protected]>
- Loading branch information
Showing
11 changed files
with
119 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
modules/sc-mesh-secure-deployment/src/nats/initd/S90Alfred
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
### BEGIN INIT INFO | ||
# Provides: S90Alfred | ||
# Short-Description: alfred | ||
# Description: Starts alfred to provide visualization data | ||
### END INIT INFO | ||
|
||
DAEMON="alfred" | ||
DIR="/usr/bin/" | ||
PIDFILE="/var/run/$DAEMON.pid" | ||
# shellcheck source=/dev/null | ||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" | ||
LOG_FILE=/opt/alfred.log | ||
|
||
source /opt/mesh-helper.sh | ||
# sources mesh configuration | ||
source_configuration "id0" | ||
bridge_name=$(echo "$BRIDGE" | cut -d' ' -f1) | ||
|
||
ARGS="-i $bridge_name -m" | ||
|
||
wait_for_bridge() { | ||
while [ ! -d "/sys/class/net/$bridge_name" ]; do | ||
sleep 1 | ||
done | ||
} | ||
|
||
start() { | ||
echo "$ARGS" | ||
printf 'Starting %s: ' "$DAEMON" | ||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -a /bin/bash -- -c "exec $DIR$DAEMON \ | ||
$ARGS > $LOG_FILE 2>&1" | ||
status=$? | ||
if [ "$status" -eq 0 ]; then | ||
echo "OK" | ||
else | ||
echo "FAIL" | ||
fi | ||
return "$status" | ||
} | ||
stop() { | ||
printf 'Stopping %s: ' "$DAEMON" | ||
start-stop-daemon -K -q -p "$PIDFILE" | ||
status=$? | ||
if [ "$status" -eq 0 ]; then | ||
rm -f "$PIDFILE" | ||
echo "OK" | ||
else | ||
echo "FAIL" | ||
fi | ||
return "$status" | ||
} | ||
restart() { | ||
stop | ||
sleep 1 | ||
start | ||
} | ||
case "$1" in | ||
start|stop|restart) | ||
"$1";; | ||
reload) | ||
# Restart, since there is no true "reload" feature. | ||
restart;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart|reload}" | ||
exit 1 | ||
esac | ||
|
||
exit 0 | ||
|
3 changes: 2 additions & 1 deletion
3
modules/sc-mesh-secure-deployment/src/nats/requirements/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
cryptography==3.4.8 | ||
PyKCS11==1.5.11 | ||
requests==2.31.0 | ||
pycryptodome==3.18.0 | ||
pycryptodome==3.18.0 | ||
nats-py==2.1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
modules/sc-mesh-secure-deployment/src/nats/scripts/cli_settings_request_mcc.py
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
modules/sc-mesh-secure-deployment/src/nats/scripts/cli_settings_request_scc.py
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
modules/sc-mesh-secure-deployment/src/nats/scripts/cli_subscribe_settings_csa.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.