wenxue.guo
2023-12-22 d451d07f2ead8cef2134185fd8e5054927921d4f
1
2
3
4
5
6
7
8
9
10
11
[Unit]
Description=Turn on SSH if /run/media/boot-mmcblk0p1/ssh is present
ConditionPathExists=/run/media/boot-mmcblk0p1/ssh
After=weston.service
 
[Service]
Type=oneshot
ExecStart=/bin/sh -c "/bin/sed -i 's/^#PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config && rm -f /run/media/boot-mmcblk0p1/ssh"
 
[Install]
WantedBy=multi-user.target