forked from hasgeek/confrouter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (27 loc) · 937 Bytes
/
Makefile
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
27
28
29
30
# Makefile to install conference router configuration
all:
echo "Usage: sudo make install"
install:
# Install router
install -T -m 644 etc/default/router.sh /etc/default/router
install -T -m 755 etc/init.d/router.sh /etc/init.d/router
update-rc.d router defaults
# Install config files
install --suffix=.orig -b -m 644 etc/network/interfaces /etc/network
install --suffix=.orig -b -m 644 etc/dnsmasq.conf /etc
install --suffix=.orig -b -m 644 etc/squid3/squid.conf /etc/squid3
# Restart services
/etc/init.d/router restart
/etc/init.d/dnsmasq restart
uninstall:
# Restore config files
mv -f /etc/network/interfaces.orig /etc/network/interfaces
mv -f /etc/dnsmasq.conf.orig /etc/dnsmasq.conf
mv -f /etc/squid3/squid.conf.org /etc/squid3/squid.conf
# Remove router
/etc/init.d/router stop
rm -f /etc/default/router
rm -f /etc/init.d/router
update-rc.d router remove
# Restart services
/etc/init.d/dnsmasq restart