]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
added backup of teamspeak database to pak
authorarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 23 Feb 2008 21:33:14 +0000 (21:33 +0000)
committerarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 23 Feb 2008 21:33:14 +0000 (21:33 +0000)
configured addonsvc as a pak

git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1232 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/backup/includes/teamspeak [new file with mode: 0644]
config/rootfiles/packages/addonsvc [new file with mode: 0644]
lfs/addonsvc [new file with mode: 0644]
src/initscripts/init.d/teamspeak
src/paks/teamspeak/install.sh
src/paks/teamspeak/uninstall.sh

diff --git a/config/backup/includes/teamspeak b/config/backup/includes/teamspeak
new file mode 100644 (file)
index 0000000..13705d3
--- /dev/null
@@ -0,0 +1,7 @@
+/opt/teamspeak/bad_names.txt
+/opt/teamspeak/server.dbs
+/opt/teamspeak/server.ini
+/opt/teamspeak/server.log
+/opt/teamspeak/whitelist.txt
+
+
diff --git a/config/rootfiles/packages/addonsvc b/config/rootfiles/packages/addonsvc
new file mode 100644 (file)
index 0000000..404821f
--- /dev/null
@@ -0,0 +1,3 @@
+usr/local/bin/addonctrl
+srv/web/ipfire/cgi-bin/addonsvc.cgi
+var/ipfire/menu.d/EX-addonsvc.menu
diff --git a/lfs/addonsvc b/lfs/addonsvc
new file mode 100644 (file)
index 0000000..cb52bc6
--- /dev/null
@@ -0,0 +1,58 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program 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 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = ipfire
+
+THISAPP    = addonsvc-$(VER)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = addonsvc
+PAK_VER    = 1
+
+DEPS       = ""
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+install : $(TARGET)
+
+check : 
+
+download :
+
+md5 : 
+
+dist: 
+       @$(PAK)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @$(POSTBUILD)
index 9f63a0a25648948e5db6e0d7686deaf53d48bfd8..fde1696e56f4e7a2491a53b76e63da2027d8f67b 100644 (file)
@@ -14,5 +14,5 @@
 
 export LANG=en_US.utf8
 cd /opt/teamspeak && sudo -u teamspeak ./teamspeak2-server_startscript $*
-
+exit 0
 # End $rc_base/init.d/teamspeak
index 16333af374f3ddd109695843d42e31819c7ac95f..7e8a5c1793444146d3551c3241a0f5dd1fadad6e 100644 (file)
@@ -44,8 +44,11 @@ useradd -g teamspeak teamspeak
 
 chown teamspeak.teamspeak /opt/teamspeak -Rv
 
+restore_backup ${NAME}
 start_service --background ${NAME}
 
 ln -sf  ../init.d/teamspeak /etc/rc.d/rc0.d/K00teamspeak
 ln -sf  ../init.d/teamspeak /etc/rc.d/rc3.d/S99teamspeak
 ln -sf  ../init.d/teamspeak /etc/rc.d/rc6.d/K00teamspeak
+
+
index 583f97ef433d3f3fa1b88e07043dd4a821042c04..d8010b0adc3c4643064a0a5e119f400d76213b56 100644 (file)
 #
 . /opt/pakfire/lib/functions.sh
 stop_service ${NAME}
+
+if [ ! -e "/var/ipfire/backup/addons/includes/teamspeak ]; then
+    echo /opt/teamspeak/bad_names.txt > /var/ipfire/backup/addons/includes/teamspeak
+    echo /opt/teamspeak/server.dbs >> /var/ipfire/backup/addons/includes/teamspeak
+    echo /opt/teamspeak/server.ini >> /var/ipfire/backup/addons/includes/teamspeak
+    echo /opt/teamspeak/server.log >> /var/ipfire/backup/addons/includes/teamspeak
+    echo /opt/teamspeak/whitelist.txt >> /var/ipfire/backup/addons/includes/teamspeak
+fi
+make_backup ${NAME}
 rm -rf /opt/teamspeak
 userdel teamspeak
 rm -rf /etc/rc.d/rc*.d/*teamspeak
+
+