mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-22 02:33:42 +02:00
6.16_disable_rsync.sh
This commit is contained in:
12
lib/utils.sh
12
lib/utils.sh
@ -117,6 +117,18 @@ add_line_file_before_pattern() {
|
||||
sed -i "/$PATTERN/i $LINE" $FILE
|
||||
FNRET=0
|
||||
}
|
||||
|
||||
replace_in_file() {
|
||||
local FILE=$1
|
||||
local SOURCE=$2
|
||||
local DESTINATION=$3
|
||||
|
||||
debug "Replacing $SOURCE to $DESTINATION in $FILE"
|
||||
debug "sed -i 's/$SOURCE/$DESTINATION/g' $FILE"
|
||||
sed -i "s/$SOURCE/$DESTINATION/g" $FILE
|
||||
FNRET=0
|
||||
}
|
||||
|
||||
#
|
||||
# User manipulation
|
||||
#
|
||||
|
Reference in New Issue
Block a user