| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # Filename: PBI.RemoveScript.sh |
|---|
| 3 | # Place any custom removal code here. |
|---|
| 4 | # This script will be run before your program is deleted. |
|---|
| 5 | # ${1} is the directory name. |
|---|
| 6 | # ${2} is the username of person performing the deletion. |
|---|
| 7 | # TIP: 'kdialog' should be used for user interaction. |
|---|
| 8 | ######################################### |
|---|
| 9 | rm -fR /usr/local/bin/lynx |
|---|
| 10 | rm -fR /usr/local/etc/lynx.cfg.default |
|---|
| 11 | rm -fR /usr/local/etc/lynx.lss |
|---|
| 12 | rm -fR /usr/local/man/man1/lynx.1.gz |
|---|
| 13 | rm -fR /usr/local/share/doc/lynx |
|---|
| 14 | rm -fR /usr/local/share/lynx_help |
|---|
| 15 | rm -fR /usr/local/etc/lynx.cfg |
|---|
| 16 | |
|---|
| 17 | if [ ! -z "$DISPLAY" ] |
|---|
| 18 | then |
|---|
| 19 | # Ask if we want to remove the user profiles |
|---|
| 20 | kdialog --yesno "Do you want to remove Lynx user settings?" --title "Remove user settings" |
|---|
| 21 | if [ "$?" = "0" ] |
|---|
| 22 | then |
|---|
| 23 | cd /home |
|---|
| 24 | for i in `ls` |
|---|
| 25 | do |
|---|
| 26 | if [ -e "/home/${i}/.lynx" ] |
|---|
| 27 | then |
|---|
| 28 | rm -rf /home/${i}/.lynx |
|---|
| 29 | fi |
|---|
| 30 | done |
|---|
| 31 | fi |
|---|
| 32 | fi |
|---|