Files
agnos-builder/userspace/root/usr/comma/set_ssh.sh
2026-05-02 19:08:26 -07:00

11 lines
242 B
Bash
Executable File

#!/bin/bash
SSH_PARAM="/data/params/d/SshEnabled"
if [ -f "$SSH_PARAM" ] && [ "$(< $SSH_PARAM)" == "1" ]; then
echo "Enabling SSH"
/usr/comma/shims/systemctl start ssh
else
echo "Disabling SSH"
/usr/comma/shims/systemctl stop ssh
fi