forked from noobkilervip/cloud9-vnc
-
Notifications
You must be signed in to change notification settings - Fork 13
/
uninstall.sh
executable file
·44 lines (36 loc) · 908 Bytes
/
uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#Request sudo permissions
if [[ $UID != 0 ]]; then
echo "Please run this script with sudo:"
echo "sudo $0 $*"
exit 1
fi
# Kill running sessions
echo "Killing running sessions"
echo
/opt/c9vnc/c9vnc.sh -k
#Remove supervisord configuration
echo "Removing supervisord configuration"
echo
rm -f ${HOME}/.config/supervisord.conf
#Remove C9 runner
echo "Removing C9 runner"
echo
rm -f ${HOME}/workspace/.c9/runners/c9vnc.run
#Remove noVNC
echo "Removing noVNC"
echo
sudo rm -rf /opt/noVNC/
#Remove script directory
echo "Removing install directory"
echo
sudo rm -rf /opt/c9vnc/
#Remove X11 exports
echo "Removing X11 configuration"
echo
grep -v "export DISPLAY=:99.0" ~/.bashrc > /tmp/bashrc-temp
mv /tmp/bashrc-temp ~/.bashrc
grep -v "export XDG_RUNTIME_DIR=/tmp/C9VNC" ~/.bashrc > /tmp/bashrc-temp
mv /tmp/bashrc-temp ~/.bashrc
rm -f /tmp/bashrc-temp
echo "Uninstalled cloud9-vnc"