aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkvnc
blob: f809bd6dd038e27aa95e575b6c8fff5dd71424fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
# check if vnc server is running, and if not, cleanup and restart
#
grep ':170D' /proc/net/tcp > /dev/null
if [ $? != 0 ]; then
    echo "Xvnc not running, attempting restart"
    vncserver -kill :1
    vncserver
fi