1

Add original scripts

This commit is contained in:
eleksir
2016-09-04 22:20:40 +03:00
commit 8e3af042d2
128 changed files with 19003 additions and 0 deletions

49
cloud3p.sh Executable file
View File

@@ -0,0 +1,49 @@
#!/bin/sh
EXE_CLOUD3P=/usr/sbin/cloud3p
DIR_VAULT_CONF=/etc/config/vaultServices
SZF_VAULT_CONF=vaultServices.config
SZP_VAULT_CONF_DEF=/etc/default_config/vaultServices/vaultServices.config
start()
{
if [ -f $EXE_CLOUD3P ]; then
echo "Startup all cloud related services..."
[ -d $DIR_VAULT_CONF ] || /usr/bin/install -d $DIR_VAULT_CONF
if [ ! -f $DIR_VAULT_CONF/$SZF_VAULT_CONF ] && [ -f $SZP_VAULT_CONF_DEF ]; then
/bin/cp -p $SZP_VAULT_CONF_DEF $DIR_VAULT_CONF/$SZF_VAULT_CONF
fi
$EXE_CLOUD3P --start
fi
}
stop()
{
if [ -f $EXE_CLOUD3P ]; then
echo "Shutting down all cloud related services..."
$EXE_CLOUD3P --stop
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "Usage: /etc/init.d/cloud3p.sh {start|stop|restart}"
exit 1
esac
exit 0