Mercurial > trustbridge
comparison packaging/linux-installer.inc.in @ 750:27dd0012288a
Remove cron job on deinstallation.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 04 Jul 2014 17:18:05 +0200 |
parents | 778382342802 |
children | d8c8e14b9953 |
comparison
equal
deleted
inserted
replaced
749:778382342802 | 750:27dd0012288a |
---|---|
191 { | 191 { |
192 # FIXME: handle case of system wide installation. | 192 # FIXME: handle case of system wide installation. |
193 local tmpcrontab=`mktemp` | 193 local tmpcrontab=`mktemp` |
194 crontab -l | grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \ | 194 crontab -l | grep -vF "${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh" \ |
195 >"$tmpcrontab" | 195 >"$tmpcrontab" |
196 echo "$(( $RANDOM / 555 )) 12 * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \ | 196 if [ "$1" != "deinstall" ] ; then |
197 >>"$tmpcrontab" | 197 echo "$(( $RANDOM / 555 )) 12 * * * \"${instcfg[PREFIX]}/bin/trustbridge-tray-starter.sh\"" \ |
198 >>"$tmpcrontab" | |
199 fi | |
198 crontab "$tmpcrontab" | 200 crontab "$tmpcrontab" |
199 rm "$tmpcrontab" | 201 rm "$tmpcrontab" |
202 } | |
203 | |
204 remove_cronjob() | |
205 { | |
206 setup_cronjob deinstall | |
200 } | 207 } |
201 | 208 |
202 deinstall_certs() | 209 deinstall_certs() |
203 { | 210 { |
204 local cinst="${oldinstcfg[PREFIX]}/bin/cinst" | 211 local cinst="${oldinstcfg[PREFIX]}/bin/cinst" |
218 fi | 225 fi |
219 } | 226 } |
220 | 227 |
221 deinstall_etc() | 228 deinstall_etc() |
222 { | 229 { |
230 echo "Removing cron job ..." | |
231 remove_cronjob | |
232 | |
223 # FIXME: delete all files created by the application. | 233 # FIXME: delete all files created by the application. |
224 local tbcfg_file="${instcfg_path}/TrustBridge.ini" | 234 local tbcfg_file="${instcfg_path}/TrustBridge.ini" |
225 | 235 |
226 echo "Removing certificate lists from: ${instdata_path}:" | 236 echo "Removing certificate lists from: ${instdata_path}:" |
227 for file in "$instdata_path"/list-*.txt ; do | 237 for file in "$instdata_path"/list-*.txt ; do |