mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 21:25:38 +00:00
bug1873: formatting only
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Purpose: The first parameter is an image type. This script iterates over the image types' USER folders, concatenating all the symbolic
|
||||
# links (referencing locations within configuration/crontabs) into one file for each user. It also takes the name of the user containing a copy of the git repo
|
||||
# Purpose: The first parameter is an image type. This script iterates over the image types' USER folders,
|
||||
# concatenating all the symbolic links (referencing locations within configuration/crontabs) into one crontab
|
||||
# file for each user. It also takes the name of the user containing a copy of the git repo
|
||||
# as well as the name of the dir within that user to go to. The created files for each user go into that user's
|
||||
# home dir and are installed for that user too. Note: within these crontabs are certain regexes, which are replaced by the path to the git home dir and the matching
|
||||
# user's home.
|
||||
# home dir and are installed for that user too. Note: within these crontabs are certain regexes, which are
|
||||
# replaced by the path to the git home dir and the matching user's home.
|
||||
# Useful files are also copied across from the "files" dir within each image type.
|
||||
|
||||
if [[ $# -ne 3 && $# -ne 4 && $# -ne 5 ]]; then
|
||||
@@ -37,6 +38,7 @@ if [[ -d "users" ]]; then
|
||||
for dir in $(ls -d */ ); do
|
||||
USERNAME=$(echo $dir | sed "s/\/$//") # Dirname is the username. The trailing slash is removed.
|
||||
HOME_DIR=$(eval echo $(printf "~%q" "$USERNAME")) # The path to the home dir of the user whose cronjob will be installed.
|
||||
# Clear the crontab file before assembling it from the snippets:
|
||||
> $HOME_DIR/crontab
|
||||
for crontab in $(ls ${USERNAME}/crontab*); do
|
||||
cat "${crontab}">> $HOME_DIR/crontab
|
||||
@@ -56,4 +58,4 @@ if [[ "$ONLY_CRONTAB" != "true" && -d "files" ]]; then
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl reenable $(find /etc/systemd/system/ -type f) # to recreate all the dependency links.
|
||||
systemctl reenable $(find /etc/systemd/system/ -type f) # to recreate all the dependency links.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup script for Amazon Linux 2. May need to update macro definitions for the archive IP.
|
||||
# Parameter 1 is the IP and parameter 2 is the bearer token to be installed in the root home dir.
|
||||
# Setup script for Amazon Linux 2. May need to update macro definitions for the archive IP.
|
||||
# Parameter 1 is the IP and parameter 2 is the bearer token to be installed in the root home dir.
|
||||
# Ensure that the security for requesting the metadata uses IMDSv1
|
||||
IP=$1
|
||||
BEARER_TOKEN=$2
|
||||
@@ -64,4 +64,4 @@ systemctl start httpd
|
||||
sudo systemctl start crond.service
|
||||
systemctl enable imageupgrade.service
|
||||
cd /
|
||||
SECONDEOF
|
||||
SECONDEOF
|
||||
|
||||
Reference in New Issue
Block a user