| 153 | | * |
| | 153 | * nutch.postrm |
| | 154 | |
| | 155 | {{{ |
| | 156 | #!/bin/sh |
| | 157 | |
| | 158 | echo "$1" |
| | 159 | |
| | 160 | if [ "$1" != remove ] |
| | 161 | then |
| | 162 | exit 0 |
| | 163 | fi |
| | 164 | |
| | 165 | setup_hdfsadm_user() { |
| | 166 | if ! getent passwd hdfsadm >/dev/null; then |
| | 167 | echo "no account found: 'hdfsadm'." |
| | 168 | else |
| | 169 | userdel hdfsadm |
| | 170 | rm -rf /home/hdfsadm |
| | 171 | rm -rf /opt/nutch |
| | 172 | rm -rf /tmp/hadoop* |
| | 173 | rm -rf /tmp/hsperfdata* |
| | 174 | fi |
| | 175 | } |
| | 176 | |
| | 177 | setup_hdfsadm_user |
| | 178 | }}} |
| | 179 | |
| | 180 | * nutch.postinst |
| | 181 | |
| | 182 | {{{ |
| | 183 | #!/bin/sh |
| | 184 | |
| | 185 | echo "$1" |
| | 186 | |
| | 187 | if [ "$1" != configure ] |
| | 188 | then |
| | 189 | exit 0 |
| | 190 | fi |
| | 191 | |
| | 192 | show_message() { |
| | 193 | echo "You can quickly start by following ways [in /opt/nutch/ with root privilege]:" |
| | 194 | echo "(1) Modify the urls/urls.txt file with indicate urls, one site one line." |
| | 195 | echo "(2) Use this instruction \"bin/nutch crawl urls -dir search -depth 4 -topN 50\" to crawl web" |
| | 196 | echo "(3) Type \" tomcat/bin/startup.sh \" and use browser to check the result in http://localhost:8080/" |
| | 197 | echo "Enjoy !" |
| | 198 | } |
| | 199 | show_message |
| | 200 | }}} |