diff --git a/board/common/post-build.sh b/board/common/post-build.sh index 745d1269..8dffb4d6 100755 --- a/board/common/post-build.sh +++ b/board/common/post-build.sh @@ -32,3 +32,10 @@ if [ -f "$TARGET_DIR/etc/dhcpcd.conf" ]; then EOF fi fi + +# Enable NETCONF over SSH +if [ -f "$TARGET_DIR/etc/ssh/sshd_config" ]; then + if ! grep -q clixon_netconf "$TARGET_DIR/etc/ssh/sshd_config"; then + sed -i '/^Subsystem[[:space:]]sftp.*/a Subsystem netconf /usr/bin/clixon_netconf -f /etc/example.xml' "$TARGET_DIR/etc/ssh/sshd_config" + fi +fi