summaryrefslogtreecommitdiff
path: root/ctdb/config/events.d/40.vsftpd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-09-14 14:14:03 +1000
committerAndrew Tridgell <tridge@samba.org>2007-09-14 14:14:03 +1000
commitc62490569b81408a7577234434663a072059c798 (patch)
tree116c1ba35f8dd99f5c284ea85250ca781ff8d1cd /ctdb/config/events.d/40.vsftpd
parent305f432e50d5fe764d7efa8a2c0018f46bff969a (diff)
downloadsamba-c62490569b81408a7577234434663a072059c798.tar.gz
cope with non-standard install dirs in event scripts
(This used to be ctdb commit 52fff5345873690a9cc86495f414343eaa3bd540)
Diffstat (limited to 'ctdb/config/events.d/40.vsftpd')
-rwxr-xr-xctdb/config/events.d/40.vsftpd12
1 files changed, 6 insertions, 6 deletions
diff --git a/ctdb/config/events.d/40.vsftpd b/ctdb/config/events.d/40.vsftpd
index 6f48e37b32a..525b69bf79d 100755
--- a/ctdb/config/events.d/40.vsftpd
+++ b/ctdb/config/events.d/40.vsftpd
@@ -1,7 +1,7 @@
#!/bin/sh
# event strict to manage vsftpd in a cluster environment
-. /etc/ctdb/functions
+. $CTDB_BASE/functions
loadconfig vsftpd
[ "$CTDB_MANAGES_VSFTPD" = "yes" ] || exit 0
@@ -11,7 +11,7 @@ shift
case $cmd in
startup)
- /bin/mkdir -p /etc/ctdb/state/vsftpd
+ /bin/mkdir -p $CTDB_BASE/state/vsftpd
# make sure the service is stopped first
service vsftpd stop > /dev/null 2>&1
@@ -23,22 +23,22 @@ case $cmd in
;;
takeip)
- echo "restart" >> /etc/ctdb/state/vsftpd/restart
+ echo "restart" >> $CTDB_BASE/state/vsftpd/restart
;;
releaseip)
- echo "restart" >> /etc/ctdb/state/vsftpd/restart
+ echo "restart" >> $CTDB_BASE/state/vsftpd/restart
;;
recovered)
# if we have taken or released any ips we must
# restart vsftpd to ensure that all tcp connections are reset
- [ -f /etc/ctdb/state/vsftpd/restart ] && {
+ [ -f $CTDB_BASE/state/vsftpd/restart ] && {
service vsftpd stop > /dev/null 2>&1
service vsftpd start
} >/dev/null 2>&1
- /bin/rm -f /etc/ctdb/state/vsftpd/restart
+ /bin/rm -f $CTDB_BASE/state/vsftpd/restart
;;
esac