Changeset View
Changeset View
Standalone View
Standalone View
head/www/owncloud/pkg-install
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
#! /bin/sh | |||||
# ex:sw=4 sts=4 | |||||
move_newsyslog_conf() { | |||||
oldfile=${PKG_PREFIX}/etc/newsyslog.conf.d/owncloud | |||||
newfile=${PKG_PREFIX}/etc/newsyslog.conf.d/owncloud.conf | |||||
samplefile=${PKG_PREFIX}/share/examples/owncloud/newsyslog | |||||
if [ -f ${oldfile} ]; then | |||||
echo "Configuration file found in old location: ${oldfile}" | |||||
if cmp -s ${samplefile} ${newfile} > /dev/null; then | |||||
echo "Configuration file in new location has not been modified from the default: ${newfile}" | |||||
echo " => Moving old configuration file to new location" | |||||
mv -f ${oldfile} ${newfile} | |||||
else | |||||
echo "Configuration file in new location has been modified from the default: ${newfile}" | |||||
echo " => Deleting old configuration file" | |||||
rm ${oldfile} | |||||
fi | |||||
fi | |||||
} | |||||
######################################################################## | |||||
case $2 in | |||||
POST-INSTALL) | |||||
move_newsyslog_conf | |||||
;; | |||||
esac |