summaryrefslogtreecommitdiff
path: root/network/lizardfs/setup.lizardfs-services.new
diff options
context:
space:
mode:
authorMarcin Szychowski <szycha@gmail.com>2018-02-27 09:39:29 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-03-03 08:42:07 +0700
commit16e19b7f76eede875e1697468baf618b6ed0b403 (patch)
tree1e662456488bb016a9e93f96982a8dce4dd7dbbc /network/lizardfs/setup.lizardfs-services.new
parentda1cfc02cfe67375bc6a10abc55a5030535f0db8 (diff)
downloadslackbuilds-16e19b7f76eede875e1697468baf618b6ed0b403.tar.gz
network/lizardfs: Added (GPLv3 implementation of GoogleFS).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/lizardfs/setup.lizardfs-services.new')
-rw-r--r--network/lizardfs/setup.lizardfs-services.new94
1 files changed, 94 insertions, 0 deletions
diff --git a/network/lizardfs/setup.lizardfs-services.new b/network/lizardfs/setup.lizardfs-services.new
new file mode 100644
index 0000000000..c9b1e6c2f9
--- /dev/null
+++ b/network/lizardfs/setup.lizardfs-services.new
@@ -0,0 +1,94 @@
+#!/bin/sh
+#BLURB="Select/deselect LizardFS services"
+#
+# /var/log/setup/setup.lizardfs-services
+#
+# LizardFS configuration script. Lets you choose which of four
+# it's processes will run on this box.
+#
+TMP=/var/log/setup/tmp
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP
+fi
+T_PX="$1"
+cd $T_PX
+rm -f $TMP/tmpscript
+
+cat << EOF > $TMP/tmpscript
+dialog --title "CHOOSE LizardFS SERVICES TO RUN ON THIS BOX" --item-help --checklist \\
+"The selected services will be started by rc.lizardfs init script.\\n\\n
+1. You need exactly ONE master server (run on your best machine)\\n
+2. You should have one, two or more meta loggers\\n
+3. On most machines you will need chunk server process only \\
+(therefore rc.lizardfs-chunkserver is enabled by default.\\n\\n
+Press the ENTER key when you are finished." \\
+19 70 4 \\
+EOF
+
+if [ -r /etc/rc.d/rc.lizardfs-master ]; then
+ if [ -x /etc/rc.d/rc.lizardfs-master ]; then
+ MFS_MASTER=on
+ else
+ MFS_MASTER=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.lizardfs-master" "LizardFS master server" $MFS_MASTER "The Master Server is a central point of LizardFS. You need exactly ONE." \\
+EOF
+fi
+
+if [ -r /etc/rc.d/rc.lizardfs-cgiserv ]; then
+ if [ -x /etc/rc.d/rc.lizardfs-cgiserv ]; then
+ MFS_CGI=on
+ else
+ MFS_CGI=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.lizardfs-cgiserv" "LizardFS Web Console" $MFS_CGI "The CGI server displays information on LizardFS status." \\
+EOF
+fi
+
+if [ -r /etc/rc.d/rc.lizardfs-metalogger ]; then
+ if [ -x /etc/rc.d/rc.lizardfs-metalogger ]; then
+ MFS_METALOGGER=on
+ else
+ MFS_METALOGGER=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.lizardfs-metalogger" "Metalogger process" $MFS_METALOGGER "Metalogger is a backup machine for Master Server. Deploy some in your network." \\
+EOF
+fi
+
+if [ -r /etc/rc.d/rc.lizardfs-chunkserver ]; then
+ if [ -x /etc/rc.d/rc.lizardfs-chunkserver ]; then
+ MFS_CHUNK=on
+ else
+ MFS_CHUNK=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.lizardfs-chunkserver" "Chunk server process" $MFS_CHUNK "The Chunk Server stores actual filesystem data in chunks. All other machines." \\
+EOF
+fi
+
+cat << EOF >> $TMP/tmpscript
+ 2> $TMP/reply
+EOF
+
+. $TMP/tmpscript
+
+if [ ! $? = 0 ]; then
+ rm -f $TMP/reply $TMP/tmpscript
+ exit
+fi
+
+for service in rc.lizardfs-cgiserv rc.lizardfs-chunkserver rc.lizardfs-master rc.lizardfs-metalogger; do
+ if [ -f /etc/rc.d/$service ]; then
+ if grep -w $service $TMP/reply 1> /dev/null ; then
+ chmod 755 /etc/rc.d/$service
+ else
+ chmod 644 /etc/rc.d/$service
+ fi
+ fi
+done
+
+rm -f $TMP/reply $TMP/tmpscript
+