Only add rules if they don't already exist
This commit is contained in:
parent
11d451742f
commit
8d1240017b
|
@ -73,11 +73,13 @@ if [ ! -d "$LISTDIR" ]; then
|
||||||
mkdir -m 700 $LISTDIR/cur
|
mkdir -m 700 $LISTDIR/cur
|
||||||
fi
|
fi
|
||||||
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
|
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
|
||||||
echo "" >> $PM
|
if ! grep -q "From: $EMAILADDRESS" $PM; then
|
||||||
echo ":0" >> $PM
|
echo "" >> $PM
|
||||||
echo " * ^From: $EMAILADDRESS" >> $PM
|
echo ":0" >> $PM
|
||||||
echo "$LISTDIR/new" >> $PM
|
echo " * ^From: $EMAILADDRESS" >> $PM
|
||||||
chown $MYUSERNAME:$MYUSERNAME $PM
|
echo "$LISTDIR/new" >> $PM
|
||||||
|
chown $MYUSERNAME:$MYUSERNAME $PM
|
||||||
|
fi
|
||||||
if [ ! -f "$MUTTRC" ]; then
|
if [ ! -f "$MUTTRC" ]; then
|
||||||
cp /etc/Muttrc $MUTTRC
|
cp /etc/Muttrc $MUTTRC
|
||||||
chown $MYUSERNAME:$MYUSERNAME $MUTTRC
|
chown $MYUSERNAME:$MYUSERNAME $MUTTRC
|
||||||
|
|
|
@ -79,7 +79,7 @@ if [ ! -d "$LISTDIR" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
|
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
|
||||||
if ! grep -q "$LISTDIR/new" $PM; then
|
if ! grep -q "Subject:.*()\[$SUBJECTTAG\]" $PM; then
|
||||||
echo "" >> $PM
|
echo "" >> $PM
|
||||||
echo ":0" >> $PM
|
echo ":0" >> $PM
|
||||||
echo " * ^Subject:.*()\[$SUBJECTTAG\]" >> $PM
|
echo " * ^Subject:.*()\[$SUBJECTTAG\]" >> $PM
|
||||||
|
|
Loading…
Reference in New Issue