diff options
author | Simon Rettberg | 2018-05-07 14:41:21 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-05-07 14:41:21 +0200 |
commit | f21b0ae728a415849b70c2e290a24f8625dfc91d (patch) | |
tree | 987f68aebd661985237a10322c2223cd15115889 /satellit_installer/includes/50-copyscripts.inc | |
parent | [SSPS] static files: netsetup now accepts stuff like ens160 etc. (diff) | |
download | setup-scripts-f21b0ae728a415849b70c2e290a24f8625dfc91d.tar.gz setup-scripts-f21b0ae728a415849b70c2e290a24f8625dfc91d.tar.xz setup-scripts-f21b0ae728a415849b70c2e290a24f8625dfc91d.zip |
[SSPS] Add http based timesync on bootup
Diffstat (limited to 'satellit_installer/includes/50-copyscripts.inc')
-rw-r--r-- | satellit_installer/includes/50-copyscripts.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/satellit_installer/includes/50-copyscripts.inc b/satellit_installer/includes/50-copyscripts.inc index 8697aa0..b67642d 100644 --- a/satellit_installer/includes/50-copyscripts.inc +++ b/satellit_installer/includes/50-copyscripts.inc @@ -22,3 +22,15 @@ install_finalize() { cp -a "$BASEDIR/static_files/finalize" "/usr/local/bin/" || perror "Could not install finalize script" chown root:root "/usr/local/bin/finalize" } + +install_timesync() { + mkdir -p "/usr/local/sbin" "/etc/systemd/system/basic.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/basic.target.wants/redneck-timesync.service" \ + || perror "Could not symlink redneck-timesync.service from /etc/systemd/system/basic.target.wants/redneck-timesync.service" +} + |