]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
tor: Bump package version to 6 and fix backup.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Feb 2014 14:39:35 +0000 (15:39 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Feb 2014 14:39:35 +0000 (15:39 +0100)
The backup include file is missing in older releases
and will be created on the fly when updating old packages.

lfs/tor
src/paks/tor/install.sh [new file with mode: 0644]
src/paks/tor/uninstall.sh [new file with mode: 0644]
src/paks/tor/update.sh [new file with mode: 0644]

diff --git a/lfs/tor b/lfs/tor
index 9669ea74ec0e93b049e2592aaefde80fde96bfd3..79567366aa6b6507b2ecf0600fee2cf25f95f3fc 100644 (file)
--- a/lfs/tor
+++ b/lfs/tor
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = tor
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = tor
-PAK_VER    = 5
+PAK_VER    = 6
 
 DEPS       = "libevent2"
 
 
 DEPS       = "libevent2"
 
diff --git a/src/paks/tor/install.sh b/src/paks/tor/install.sh
new file mode 100644 (file)
index 0000000..31c5fec
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+restore_backup ${NAME}
+start_service --background ${NAME}
diff --git a/src/paks/tor/uninstall.sh b/src/paks/tor/uninstall.sh
new file mode 100644 (file)
index 0000000..a7b8a53
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+make_backup ${NAME}
+remove_files
diff --git a/src/paks/tor/update.sh b/src/paks/tor/update.sh
new file mode 100644 (file)
index 0000000..675e7f5
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+
+# Create backup include file if it is missing.
+if [ ! -e "/var/ipfire/backup/addons/includes/tor" ]; then
+        cat <<EOF > /var/ipfire/backup/addons/includes/tor
+/etc/tor
+/var/ipfire/tor
+/var/lib/tor/fingerprint
+/var/lib/tor/keys
+EOF
+fi
+
+./uninstall.sh
+./install.sh