diff options
-rwxr-xr-x | proftpd/proftpd.cf | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/proftpd/proftpd.cf b/proftpd/proftpd.cf new file mode 100755 index 0000000..31273fa --- /dev/null +++ b/proftpd/proftpd.cf @@ -0,0 +1,42 @@ +#! /usr/bin/cfengine -qf + +control: + OutputPrefix = ("${cf_prefix}") + actionsequence = ( editfiles ) + AddInstallable = ( proftpd_reload ) + EditfileSize = ( 10000 ) + +editfiles: + any:: + { /etc/proftpd.conf + DefineClasses "proftpd_reload" + AbortAtLineMatching "^[[:blank:]]*VirtualHost[[:blank:]]*.*$" + # + # ListOptions "-la" + # + WarnIfNoLineMatching "^[[:blank:]]*ListOptions[[:blank:]].*$" + BeginGroupIfNoLineMatching "^[[:blank:]]*ListOptions[[:blank:]].*$" + Append 'ListOptions "-la" # Added by cfengine' + EndGroup + LocateLineMatching "^[[:blank:]]*ListOptions[[:blank:]].*$" + BeginGroupIfNoLineMatching '^[[:blank:]]*ListOptions[[:blank:]]"-la"([[:blank:]]+(#.*)?)?$' + ReplaceLineWith 'ListOptions "-la" # Edited by cfengine' + EndGroup + # + # DefaultRoot ~ + # +# WarnIfNoLineMatching "^[[:blank:]]*DefaultRoot[[:blank:]].*$" + BeginGroupIfNoLineMatching "^[[:blank:]]*DefaultRoot[[:blank:]].*$" + Append 'DefaultRoot ~' + EndGroup + LocateLineMatching "^[[:blank:]]*DefaultRoot[[:blank:]].*$" + BeginGroupIfNoLineMatching "^[[:blank:]]*DefaultRoot[[:blank:]]+~$" + ReplaceLineWith 'DefaultRoot ~' + EndGroup + UnsetAbort "^[[:blank:]]*VirtualHost[[:blank:]]*.*$" + } +processes: + "proftpd" restart "/etc/init.d/proftpd restart" +shellcommands: + proftpd_reload:: + "/etc/init.d/proftpd force-reload" |