diff --git a/setserial/setserial.json b/setserial/setserial.json new file mode 100644 index 0000000..4821f22 --- /dev/null +++ b/setserial/setserial.json @@ -0,0 +1,21 @@ +{ + "name": "setserial", + "text": "%1 enables serial", + "script": "setserial.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 serial", + "longDescription":"Enable/Disable shell and kernel messages on the serial connection." +} diff --git a/setserial/setserial.sh b/setserial/setserial.sh new file mode 100644 index 0000000..f0f95ee --- /dev/null +++ b/setserial/setserial.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "$1" == "Enable" ] +then + raspi-config nonint do_serial 0 +else + raspi-config nonint do_serial 1 +fi \ No newline at end of file