diff --git a/setcamera/setcamera.json b/setcamera/setcamera.json new file mode 100644 index 0000000..851ab5d --- /dev/null +++ b/setcamera/setcamera.json @@ -0,0 +1,21 @@ +{ + "name": "setcamera", + "text": "%1 enables Camera module", + "script": "setcamera.sh", + "args": [ + { + "type": "menu", + "options": ["Enable", "Disable"] + } + ], + "network": false, + "continue": true, + "type": "setting", + "category":"setting", + "supportedOperatingSystems": [ + "raspbian-pibakery.img", + "raspbian-lite-pibakery.img" + ], + "shortDescription":"Enable or disable camera module", + "longDescription":"Enable this Pi to work with the Raspberry Pi Camera." +} diff --git a/setcamera/setcamera.sh b/setcamera/setcamera.sh new file mode 100644 index 0000000..3166ad6 --- /dev/null +++ b/setcamera/setcamera.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "$1" == "Enable" ] +then + raspi-config nonint do_camera 0 +else + raspi-config nonint do_camera 1 +fi