__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
Basic usage examples
====================
This directory contains basic examples of *ucf*(1) usage.
Automatic generation of the necessary fragments for common cases can also be
achieved with *dh_ucf*(1) from *debhelper*(7).
Further examples
================
Remove a ucf controlled conffile during package upgrade
---------------------------------------------------------
conffile=<Destination>
IFS=: read -r cf pkg exists modified <<EOF
$(ucfq -w $conffile)
EOF
# Sanity checks
[ "$cf" = "$conffile" ] || error_exit # Bad, should never happen
[ "$pkg" = "$DPKG_MAINTSCRIPT_PACKAGE" ] || return # Not our conffile
# Remove $conffile if it exists and is unmodified.
if [ "$exists" = Yes ] && [ "$modified" = No ]; then
rm $conffile
fi
# Purge from ucf state.
ucf --purge $conffile && ucfr --purge $DPKG_MAINTSCRIPT_PACKAGE $conffile
Rename a ucf controlled conffile during package upgrade
-------------------------------------------------------
conffile=<Old>
new_conffile=<New>
# Copy if it exists
[ -f $conffile ] && cp $conffile $new_conffile
# Register new
ucf input.conf $new_conffile
ucfr $DPKG_MAINTSCRIPT_PACKAGE $new_conffile
# Removals
if [ -f $conffile ]; then
rm $conffile
else
# The old conffile had been deleted, so
# do the same for the new one.
rm $new_conffile
fi
# Purge from ucf state.
ucf --purge $conffile && ucfr --purge $DPKG_MAINTSCRIPT_PACKAGE $conffile
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| README.md | File | 1.49 KB | 0644 |
|
| postinst | File | 448 B | 0644 |
|
| postrm | File | 581 B | 0644 |
|