summaryrefslogtreecommitdiffstats
path: root/network/lizardfs/rc.lizardfs.new
diff options
context:
space:
mode:
author Marcin Szychowski <szycha@gmail.com>2018-02-27 09:39:29 +0000
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2018-03-03 08:42:07 +0700
commit16e19b7f76eede875e1697468baf618b6ed0b403 (patch)
tree1e662456488bb016a9e93f96982a8dce4dd7dbbc /network/lizardfs/rc.lizardfs.new
parentda1cfc02cfe67375bc6a10abc55a5030535f0db8 (diff)
downloadslackbuilds-16e19b7f76eede875e1697468baf618b6ed0b403.tar.gz
slackbuilds-16e19b7f76eede875e1697468baf618b6ed0b403.tar.xz
network/lizardfs: Added (GPLv3 implementation of GoogleFS).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/lizardfs/rc.lizardfs.new')
-rw-r--r--network/lizardfs/rc.lizardfs.new66
1 files changed, 66 insertions, 0 deletions
diff --git a/network/lizardfs/rc.lizardfs.new b/network/lizardfs/rc.lizardfs.new
new file mode 100644
index 0000000000..fa5b338c78
--- /dev/null
+++ b/network/lizardfs/rc.lizardfs.new
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# Init script file for LizardFS (or MooseFS) system.
+# Written for Slackware Linux by Marcin Szychowski <szycha@gmail.com>
+# This script starts enabled LizardFS services.
+#
+# LizardFS is a distributed, self-healing, self-replicating filesystem,
+# available under GNU GPLv3 License for any FUSE-capable operating system.
+#
+# Typical LizardFS installation consists of one master server, one or
+# more meta-loggers and any number of chunk servers (the more the better).
+# lizardfs Slackware Package contains software to run any of them.
+#
+# Although it is possible to run entire LizardFS system within one host
+# you should not mix their roles across machines in a production
+# environment. Especially you should not run anything along with master
+# server process on the same machine.
+# For more details refer to lizardfs(7) manual page or LizardFS website
+# http://lizardfs.org/
+#
+# Enable this script to start/stop/restart all enabled services in a convenient
+# way rather than run services directly. For your convenience,
+# rc.lizardfs-chunkserver is enabled (executable) by default, since
+# chunkservers are dominant group in average LizardFS installation.
+
+services="master cgiserv metalogger chunkserver"
+
+function everyone() {
+ action="$1"
+
+ if [ "$action" = "stop" ]; then
+ local services="$(echo $services|tr ' ' "\n"|tac)"
+ fi
+
+ for svc in $services; do
+ if [ -x /etc/rc.d/rc.lizardfs-$svc ]; then
+ /etc/rc.d/rc.lizardfs-$svc $action
+ fi
+ done
+}
+
+
+case "$1" in
+ 'start')
+ everyone start
+ ;;
+ 'stop')
+ everyone stop
+ ;;
+ 'restart')
+ everyone stop
+ everyone start
+ ;;
+ 'condrestart')
+ everyone condrestart
+ ;;
+ 'status')
+ everyone status
+ ;;
+ 'setup')
+ /var/log/setup/setup.lizardfs-services
+ ;;
+ *)
+ echo "Usage: $0 {setup|start|stop|restart|reload|condrestart|status}"
+ ;;
+esac