Unix Use Sed and Cront to Update File Config
#! /bin/sh
sed -i 's/disable_camera_led=1/disable_camera_led=0/' /boot/config.txt
sed -i 's/cameraSettings = ""/cameraSettings = "-ex night -awb auto"/' /home/pi/picam.py
sed -i 's/-t 200/-t 500/' /home/pi/picam.py
sed -i 's/threshold = 30/threshold = 10/' /home/pi/picam.py
sed -i 's/sensitivity = 30/sensitivity = 20/' /home/pi/picam.py
/sbin/reboot
And the one by day:
sudo nano /opt/picam_day.sh
#! /bin/sh
sed -i 's/disable_camera_led=0/disable_camera_led=1/' /boot/config.txt
sed -i 's/cameraSettings = "-ex night -awb auto"/cameraSettings = ""/' /home/pi/picam.py
sed -i 's/-t 500/-t 200/' /home/pi/picam.py
sed -i 's/threshold = 10/threshold = 30/' /home/pi/picam.py
sed -i 's/sensitivity = 20/sensitivity = 30/' /home/pi/picam.py
/sbin/reboot