blob: 0c77bd46ba56d05e3e7248c81ae65ab210b7424a (
plain)
- #! /usr/bin/cfengine -qf
- control:
- OutputPrefix = ("${cf_prefix}")
- actionsequence = (
- editfiles
- shellcommands
- processes
- )
- 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"
|