summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/50-copyscripts.inc
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-17 15:08:14 +0100
committerSimon Rettberg2020-12-17 15:08:14 +0100
commitb5c3eb9e01b09367935f558a57633b68a65a1a21 (patch)
treeb6c322f3089192124779b9d7a29c8365eb39533f /satellit_installer/includes/50-copyscripts.inc
parent[SSPS] slx-cert: Put hostname in SAN too, chromium requires this (diff)
downloadsetup-scripts-b5c3eb9e01b09367935f558a57633b68a65a1a21.tar.gz
setup-scripts-b5c3eb9e01b09367935f558a57633b68a65a1a21.tar.xz
setup-scripts-b5c3eb9e01b09367935f558a57633b68a65a1a21.zip
[SSPS] Refactor static_files: Submodules with tree
Add submodules (aka directories) to static_files, named according to what component they are for. Add function "install_files" to copy the contents of one of those modules to the root directory. This should make the resulting setup more obvious and require less manual copying of files everywhere.
Diffstat (limited to 'satellit_installer/includes/50-copyscripts.inc')
-rw-r--r--satellit_installer/includes/50-copyscripts.inc35
1 files changed, 4 insertions, 31 deletions
diff --git a/satellit_installer/includes/50-copyscripts.inc b/satellit_installer/includes/50-copyscripts.inc
index 687b1a2..aee3944 100644
--- a/satellit_installer/includes/50-copyscripts.inc
+++ b/satellit_installer/includes/50-copyscripts.inc
@@ -1,36 +1,9 @@
-install_tmpdelete() {
- echo "# Copying tmpdelete.sh to /etc/cron.daily... "
- cp "$BASEDIR/static_files/tmpdelete.sh" /etc/cron.daily/tmpdelete
- chmod +x /etc/cron.daily/tmpdelete
-}
-
-install_config_static_ip() {
- echo -n "# Copying config_static_ip to /usr/local/sbin... "
- mkdir -p /usr/local/sbin 2>/dev/null # Just for being on the safe side.
- cp "$BASEDIR/static_files/netsetup" /usr/local/sbin
- echo "ok."
-}
-
-install_slxlog() {
- mkdir -p "/usr/local/bin"
- cp -a "$BASEDIR/static_files/slxlog" "/usr/local/bin/" || perror "Could not install slxlog"
- chown root:root "/usr/local/bin/slxlog"
-}
-
-install_finalize() {
- mkdir -p "/usr/local/bin"
- cp -a "$BASEDIR/static_files/finalize" "/usr/local/bin/" || perror "Could not install finalize script"
- chown root:root "/usr/local/bin/finalize"
+install_system_scripts() {
+ # Different stuff like slxlog, finalize, firstrun, netsetup
+ install_files "system"
}
install_timesync() {
- mkdir -p "/usr/local/sbin" "/etc/systemd/system/network.target.wants" \
- || perror "install_timesync: mkdir failed"
- install -m 0755 -o root "$BASEDIR/static_files/timesync/redneck-timesync.sh" "/usr/local/sbin/" \
- || perror "Could not copy redneck-timesync.sh"
- install -m 0644 -o root "$BASEDIR/static_files/timesync/redneck-timesync.service" "/etc/systemd/system/" \
- || perror "Could not copy redneck-timesync.service"
- ln -sf "../redneck-timesync.service" "/etc/systemd/system/network.target.wants/redneck-timesync.service" \
- || perror "Could not symlink redneck-timesync.service from /etc/systemd/system/network.target.wants/redneck-timesync.service"
+ install_files "timesync"
}