]>
Commit | Line | Data |
---|---|---|
581f19dd AF |
1 | #!/bin/bash |
2 | ############################################################################ | |
3 | # # | |
4 | # This file is part of the IPFire Firewall. # | |
5 | # # | |
6 | # IPFire is free software; you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation; either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # IPFire is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with IPFire; if not, write to the Free Software # | |
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # | |
19 | # # | |
20 | # Copyright (C) 2014 IPFire-Team <info@ipfire.org>. # | |
21 | # # | |
22 | ############################################################################ | |
23 | # | |
24 | . /opt/pakfire/lib/functions.sh | |
25 | /usr/local/bin/backupctrl exclude >/dev/null 2>&1 | |
26 | ||
27 | # Remove old core updates from pakfire cache to save space... | |
28 | core=80 | |
29 | for (( i=1; i<=$core; i++ )) | |
30 | do | |
31 | rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire | |
32 | done | |
33 | ||
c007921b MT |
34 | # Remove old strongswan files |
35 | rm -f \ | |
36 | /etc/strongswan.d/charon/unity.conf \ | |
37 | /usr/lib/ipsec/plugins/libstrongswan-unity.so \ | |
38 | /usr/share/strongswan/templates/config/plugins/unity.conf | |
39 | ||
581f19dd AF |
40 | # Stop services |
41 | ||
42 | # Extract files | |
43 | extract_files | |
44 | ||
45 | # Start services | |
3887d23e | 46 | /etc/init.d/dnsmasq restart |
581f19dd AF |
47 | |
48 | # Update Language cache | |
01183ccc | 49 | perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" |
581f19dd | 50 | |
8e944ec6 MT |
51 | # Uninstall the libgpg-error package. |
52 | rm -f \ | |
53 | /opt/pakfire/db/installed/meta-libgpg-error \ | |
54 | /opt/pakfire/db/rootfiles/libgpg-error | |
55 | ||
3ebc0da7 MT |
56 | # Regenerate squid configuration file |
57 | /srv/web/ipfire/cgi-bin/proxy.cgi | |
58 | ||
ee7a9de3 MT |
59 | # Generate ddns configuration file |
60 | /srv/web/ipfire/cgi-bin/ddns.cgi | |
61 | ||
62 | touch /var/ipfire/ddns/ddns.conf | |
63 | chown nobody.nobody /var/ipfire/ddns/ddns.conf | |
64 | ||
9d63220b MT |
65 | # Update crontab |
66 | sed -i /var/spool/cron/root.orig -e "/setddns.pl/d" | |
67 | ||
68 | grep -q /usr/bin/ddns /var/spool/cron/root.orig || cat <<EOF >> /var/spool/cron/root.orig | |
69 | ||
70 | # Update dynamic DNS records every five minutes. | |
71 | # Force an update once a month | |
72 | */5 * * * * [ -f "/var/ipfire/red/active" ] && /usr/bin/ddns update-all | |
73 | 3 2 1 * * [ -f "/var/ipfire/red/active" ] && /usr/bin/ddns update-all --force | |
74 | EOF | |
75 | ||
76 | fcrontab -z &>/dev/null | |
77 | ||
581f19dd AF |
78 | sync |
79 | ||
80 | # This update need a reboot... | |
81 | #touch /var/run/need_reboot | |
82 | ||
83 | # Finish | |
84 | /etc/init.d/fireinfo start | |
85 | sendprofile | |
86 | ||
87 | # Don't report the exitcode last command | |
88 | exit 0 |