send emails to users when ip doesn't match
[0tDNS.git] / install.sh
blobad7123645e6400c446d48d9413fe8a15814a0b5e
1 #!/bin/sh
3 # If we have an argument - use it as installation root
4 # and prefer it over INSTALL_ROOT variable;
5 # Otherwise, use INSTALL_ROOT if set;
6 # Otherwise, use "/"
7 if [ "x" != "x$1" ]; then
8 INSTALL_ROOT="$1"
9 elif [ "x" = "x$INSTALL_ROOT" ]; then
10 INSTALL_ROOT=/
13 # Perhaps libexec could be used for those scripts, but many
14 # systems don't use libexec;
15 # The reason they won't go to /usr/sbin or the like is because
16 # they're not to be executed directly by the user
17 install -D -m744 src/vpn_wrapper.sh "$INSTALL_ROOT"/var/lib/0tdns/vpn_wrapper.sh
18 install -D -m744 src/netns-script "$INSTALL_ROOT"/var/lib/0tdns/netns-script
19 install -D -m755 src/perform_queries.py "$INSTALL_ROOT"/var/lib/0tdns/perform_queries.py
20 install -D -m644 db_connection_config.yml "$INSTALL_ROOT"/etc/0tdns/db_connection_config.yml
22 # Those would make sense to be executed directly, so they'll go to (s)bin
23 # Those happen to also be the scripts, that get called by cron
24 install -D -m744 src/hourly.py "$INSTALL_ROOT"/usr/sbin/hourly.py
25 install -D -m744 src/check_if_done.py "$INSTALL_ROOT"/usr/sbin/check_if_done.py
26 install -D -m744 src/send_emails.py "$INSTALL_ROOT"/usr/bin/send_emails.py
28 # This one shall be imported from other scripts
29 install -D -m644 src/ztdnslib.py "$INSTALL_ROOT"/usr/lib/python3/dist-packages/ztdnslib.py
31 # simillar approach will be used to install other files