-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/leventenyiri/Packaging_sent…
- Loading branch information
Showing
3 changed files
with
40 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# configure_wifi.sh | ||
|
||
# Ensure the script is run as root | ||
if [ "$EUID" -ne 0 ]; then | ||
echo "Please run as root" | ||
exit | ||
fi | ||
|
||
# Check if environment variables are set | ||
if [ -z "$WIFI_SSID" ] || [ -z "$WIFI_PASSWORD" ]; then | ||
echo "Error: WIFI_SSID or WIFI_PASSWORD environment variable is not set" | ||
exit 1 | ||
fi | ||
|
||
# Create the wpa_supplicant.conf file | ||
cat << EOF > /etc/wpa_supplicant/wpa_supplicant.conf | ||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | ||
update_config=1 | ||
country=US | ||
network={ | ||
ssid="$WIFI_SSID" | ||
psk="$WIFI_PASSWORD" | ||
} | ||
EOF | ||
|
||
echo "Wi-Fi configuration has been updated." | ||
|
||
# Restart the wireless interface | ||
wpa_cli -i wlan0 reconfigure | ||
|
||
echo "Wireless interface has been reconfigured." |
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 |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
|
||
setup( | ||
name='sentinel-mrhat-cam', | ||
version='1.1.7', | ||
version='1.1.8', | ||
description='Testing python code for Starling detection project', | ||
author='Ferenc Nandor Janky, Attila Gombos, Nyiri Levente, Nyitrai Bence', | ||
author_email='[email protected]', | ||
packages=find_packages(), | ||
scripts=['bin/sentinel_mrhat_cam.sh', 'bin/sentinel_mrhat_cam_main.py'], | ||
scripts=['bin/sentinel_mrhat_cam.sh', 'bin/sentinel_mrhat_cam_main.py', 'bin/configure_wifi.sh'], | ||
data_files=[('config', ['config/sentinel_app_config.json', 'config/sentinel_log_config.yaml'])], | ||
install_requires=['picamera2', 'PyYAML', 'pillow', 'pytz', 'paho-mqtt', 'numpy'], | ||
) |