mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-11 00:57:52 +08:00
19 lines
447 B
Bash
19 lines
447 B
Bash
#!/bin/sh
|
|
[ ! -f "/usr/share/ucitrack/luci-app-mail.json" ] && {
|
|
cat > /usr/share/ucitrack/luci-app-mail.json << EEOF
|
|
{
|
|
"config": "mail",
|
|
"init": "mail"
|
|
}
|
|
EEOF
|
|
}
|
|
uci -q batch <<-EOF >/dev/null
|
|
delete ucitrack.@mail[-1]
|
|
add ucitrack mail
|
|
set ucitrack.@mail[-1].init=msmtp
|
|
commit ucitrack
|
|
EOF
|
|
# The SMTP password is in there: root only, as /etc/msmtprc (uci commit
|
|
# keeps the file mode)
|
|
chmod 600 /etc/config/mail 2>/dev/null
|
|
exit 0 |