From 6ea41e3a9416caa2a0adedacd5beb941d3d2b935 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Fri, 27 Apr 2018 13:09:51 +0200 Subject: [PATCH] Added tentacle configuration file to open tarball --- pandora_server/pandora_server_installer | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6fd84b2105..160e567fb1 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -27,6 +27,9 @@ TENTACLE_SERVER=/etc/init.d/tentacle_serverd PANDORA_CFG_FILE=$PANDORA_CFG_DIR/pandora_server.conf PANDORA_CFG_FILE_DIST=conf/pandora_server.conf.new PANDORA_INIT_SCRIPT=util/pandora_server +TENTACLE_CFG_DIR=/etc/tentacle +TENTACLE_CFG_FILE=$TENTACLE_CFG_DIR/tentacle_server.conf +TENTACLE_CFG_FILE_DIST=conf/tentacle_server.conf.new TENTACLE_INIT_SCRIPT=util/tentacle_serverd PERL=perl MANDIR=$PREFIX/share/man/man1 @@ -91,6 +94,8 @@ set_global_vars () { PANDORA_CFG_FILE=$PANDORA_CFG_DIR/pandora_server.conf PANDORA_CFG_FILE_DIST=$DISTRO/pandora_server.conf.new PANDORA_INIT_SCRIPT=$DISTRO/pandora_server + TENTACLE_CFG_DIR=$PREFIX/etc/tentacle + TENTACLE_CFG_FILE=$TENTACLE_CFG_DIR/tentacle_server.conf TENTACLE_INIT_SCRIPT=$DISTRO/tentacle_server MANDIR=$PREFIX/man/man1 INITDIR=$PREFIX/etc/rc.d @@ -103,6 +108,8 @@ set_global_vars () { PANDORA_HOME=$PREFIX/share/pandora_server PANDORA_CFG_DIR=$PREFIX/etc/pandora PANDORA_SERVER=/etc/rc.d/pandora_server + TENTACLE_CFG_DIR=$PREFIX/etc/tentacle + TENTACLE_CFG_FILE=$TENTACLE_CFG_DIR/tentacle_server.conf TENTACLE_SERVER=/etc/rc.d/tentacle_server PANDORA_CFG_FILE=$PANDORA_CFG_DIR/pandora_server.conf PANDORA_CFG_FILE_DIST=$DISTRO/pandora_server.conf.new @@ -361,6 +368,19 @@ install () { then # tentacle_server is already installed by "make install" install_startup_script -s 80 $TENTACLE_INIT_SCRIPT + + # Create the directory to locate the Tentacle configuration file + echo "Creating setup Tentacle directory in $TENTACLE_CFG_DIR" + mkdir -p $DESTDIR$TENTACLE_CFG_DIR 2> /dev/null + if [ -f "$DESTDIR$TENTACLE_CFG_FILE" ] + then + echo cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_DIR + cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_DIR + else + echo cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_FILE + cp $TENTACLE_CFG_FILE_DIST $DESTDIR$TENTACLE_CFG_FILE + chmod 770 $DESTDIR$TENTACLE_CFG_FILE + fi echo "Installing Tentacle Server manual" cp man/man1/tentacle_server.1.gz $DESTDIR$MANDIR @@ -457,6 +477,8 @@ uninstall () { rm -Rf $DESTDIR$PANDORA_LOG 2> /dev/null rm -f $DESTDIR$PANDORA_CFG_FILE 2> /dev/null rm -f "$DESTDIR$PANDORA_CFG_FILE.new" 2> /dev/null + rm -f $DESTDIR$TENTACLE_CFG_FILE 2> /dev/null + rm -f "$DESTDIR$TENTACLE_CFG_FILE.new" 2> /dev/null rm -f $DESTDIR$PANDORA_SERVER 2> /dev/null rm -f $DESTDIR$PREFIX/bin/pandora_server 2> /dev/null rm -f $DESTDIR$PREFIX/bin/pandora_exec 2> /dev/null