mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[enh] Add spamassassin regen conf script
This commit is contained in:
parent
c51454b7fe
commit
67b19bf431
1 changed files with 21 additions and 0 deletions
21
data/hooks/conf_regen/28-spamassassin
Normal file
21
data/hooks/conf_regen/28-spamassassin
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
force=$1
|
||||
|
||||
function safe_copy () {
|
||||
if [[ "$force" == "True" ]]; then
|
||||
sudo yunohost service safecopy \
|
||||
-s spamassassin $1 $2 --force
|
||||
else
|
||||
sudo yunohost service safecopy \
|
||||
-s spamassassin $1 $2
|
||||
fi
|
||||
}
|
||||
|
||||
cd /usr/share/yunohost/templates/spamassassin
|
||||
|
||||
safe_copy spamassassin.default /etc/default/spamassassin
|
||||
safe_copy local.cf /etc/spamassassin/local.cf
|
||||
|
||||
sudo service spamassassin restart
|
Loading…
Add table
Reference in a new issue