[freenet-cvs] r19645 - in trunk/apps/new_installer: . res/unix/bin

toad at freenetproject.org toad at freenetproject.org
Thu May 1 14:21:08 UTC 2008


Author: toad
Date: 2008-05-01 14:21:08 +0000 (Thu, 01 May 2008)
New Revision: 19645

Added:
   trunk/apps/new_installer/res/unix/bin/remove_cronjob.sh
Modified:
   trunk/apps/new_installer/install.xml
Log:
Hopefully this will remove the cronjob on uninstall through the uninstaller jar.

Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml	2008-05-01 14:08:06 UTC (rev 19644)
+++ trunk/apps/new_installer/install.xml	2008-05-01 14:21:08 UTC (rev 19645)
@@ -219,6 +219,7 @@
 		<pack name="AutoUpdater" id="autoupdater" required="no">
 			<description>Allow the node to auto-update over freenet securely. It's advised that you enable it to keep your node up-to-date.</description>
 			<singlefile src="res/license/LICENSE.Freenet" target="$INSTALL_PATH/update"/>
+			<executable targetfile="$INSTALL_PATH/bin/remove_cronjob.sh" keep="true" stage="uninstall"/>
 		</pack>
 
 		<pack name="OpenNet" id="opennet" required="no">

Added: trunk/apps/new_installer/res/unix/bin/remove_cronjob.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/remove_cronjob.sh	                        (rev 0)
+++ trunk/apps/new_installer/res/unix/bin/remove_cronjob.sh	2008-05-01 14:21:08 UTC (rev 19645)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+crontab -l > crontab.tmp
+if grep -F crontab.tmp "@reboot   \"$INSTALL_PATH/run.sh\" start"
+then
+	echo Found service in crontab, removing it...
+	cat crontab.tmp | grep -v -F "@reboot   \"$INSTALL_PATH/run.sh\" start" > crontab.tmp.new
+	crontab crontab.tmp.new
+fi
+rm -f crontab.tmp crontab.tmp.new




More information about the cvs mailing list