forked from jnuyens/freedomev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremove
More file actions
executable file
·27 lines (25 loc) · 781 Bytes
/
remove
File metadata and controls
executable file
·27 lines (25 loc) · 781 Bytes
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
#!/bin/bash
if [[ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]]
then
echo This is not supposed to run chrooted
exit 2
fi
echo "Are you sure to remove FreedomEV?"
echo "This will remove /var/freedomevstart and the crontab entries"
echo "Removing FreedomEV completely"
echo
echo Not running chrooted: OK
#check if crontabs are there
alreadyinstalled=$(crontab -l | grep '/var/freedomev')
if [[ "$alreadyinstalled" == "" ]]
then
echo "No crontab entries found - possibly already removed"
else
crontab -l | grep -v '/var/freedomev' > /tmp/crontab
cat /tmp/crontab | crontab
echo "FreedomEV crontab removal: OK"
fi
if [[ -f /var/freedomevstart ]]
then
rm /var/freedomevstart && echo "/var/freedomevstart removed" || echo "/var/freedomevstart removal failed"
fi