blob: b6469eede2d6e1ffc959804a66d216d43b3f27ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
hostname="$(uci get system.@system[0].hostname)"
case "$hostname" in
work-*)
mail="karel.koci@nic.cz"
;;
*)
mail="cynerd@email.cz"
;;
esac
uci -q batch <<EOF
set updater.autorun.enable=1
commit updater
set user_notify.smtp.enable=1
set user_notify.smtp.use_turris_smtp=1
set user_notify.smtp.sender_name='${hostname}'
del_list user_notify.smtp.to='${mail}'
add_list user_notify.smtp.to='${mail}'
set user_notify.notifications.news=1
set user_notify.notifications.severity=3
set user_notify.reboot.delay='2'
set user_notify.time='03:30'
commit user_notify
EOF
|