4: Remote commands - bruno-beloff/scs_dev GitHub Wiki
docs > software repositories > scs_dev
The scs_dev/control_receiver utility can be used in conjunction with the scs_analysis/aws_mqtt_control utility to provide a command line session over an MQTT messaging infrastructure.
For reasons of stability and security, only a limited number of commands should be made accessible in this way. To this end, the control_receiver utility will only execute commands - typically shell scripts or symbolic links to utilities installed elsewhere - that are placed in the ~/SCS/cmd directory.
Remote commands for Raspian
~/SCS/cmd directory
The following is a recommended list of utilities:
pi@scs-rpi-113:~/SCS/cmd $ ls -lF
total 4
lrwxrwxrwx 1 pi pi 48 Apr 2 11:14 afe_baseline -> /home/pi/SCS/scs_mfr/src/scs_mfr/afe_baseline.py*
lrwxrwxrwx 1 pi pi 45 Apr 2 11:11 afe_calib -> /home/pi/SCS/scs_mfr/src/scs_mfr/afe_calib.py*
lrwxrwxrwx 1 pi pi 52 Mar 8 14:54 airnow_site_conf -> /home/pi/SCS/scs_mfr/src/scs_mfr/airnow_site_conf.py*
lrwxrwxrwx 1 pi pi 38 Apr 2 11:19 ps -> /home/pi/SCS/scs_dev/src/scs_dev/ps.py*
-rwxr-xr-x 1 pi pi 26 Aug 15 13:50 reboot*
lrwxrwxrwx 1 pi pi 44 Apr 2 11:14 schedule -> /home/pi/SCS/scs_mfr/src/scs_mfr/schedule.py*
lrwxrwxrwx 1 pi pi 49 Apr 2 11:16 shared_secret -> /home/pi/SCS/scs_mfr/src/scs_mfr/shared_secret.py*
lrwxrwxrwx 1 pi pi 44 Apr 2 11:16 timezone -> /home/pi/SCS/scs_mfr/src/scs_mfr/timezone.py*
lrwxrwxrwx 1 pi pi 42 Apr 2 11:19 uptime -> /home/pi/SCS/scs_dev/src/scs_dev/uptime.py*
~/SCS/cmd/reboot
Some form of service restart is needed, and this is the simplest. The control_receiver utility should be run as user not root but, because root is not password protected on Raspian, the following should work:
pi@scs-rpi-113:~/SCS/cmd $ cat reboot
#!/bin/bash
sudo reboot