#!/bin/sh ACTIVE_SESSIONS=$(ubus call session list | jsonfilter -a -e '@[*].ubus_rpc_session' | grep -v 00000000000000000000000000000000) for SESSION in ${ACTIVE_SESSIONS}; do ubus call session destroy "{'ubus_rpc_session':\"${SESSION}\"}" done