This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
452 additions
and
738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
os_name="Kerberos.io OS" | ||
os_short_name="kios" | ||
os_prefix="kios" | ||
os_version="2.3.1" | ||
os_version="2.4.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/bash | ||
|
||
########################################## | ||
# | ||
# Update configuration files for machinery | ||
# | ||
|
||
KERBEROS_CONFIG_DIR="/etc/opt/kerberosio/config" | ||
DATA_CONFIG_DIR="/data/machinery/config" | ||
TEMP_CONFIG_DIR="/tmp/config" | ||
|
||
# Copy files to tmp folder and overwrite data config files | ||
|
||
rm -rf $TEMP_CONFIG_DIR | ||
mkdir -p $TEMP_CONFIG_DIR | ||
cp -r $DATA_CONFIG_DIR/* $TEMP_CONFIG_DIR | ||
cp -r $KERBEROS_CONFIG_DIR/* $DATA_CONFIG_DIR | ||
|
||
# Loop over old config files and adjust new configuration | ||
# with previous values. | ||
|
||
for oldfile in $TEMP_CONFIG_DIR/* | ||
do | ||
for newfile in $DATA_CONFIG_DIR/* | ||
do | ||
if [ ${oldfile#$TEMP_CONFIG_DIR} == ${newfile#$DATA_CONFIG_DIR} ] | ||
then | ||
lineNumber=1 | ||
|
||
while read p | ||
do | ||
name=`echo $p | grep -E "\<(.*?)\>(.*?)<(.*?)\>" | cut -d ">" -f1 | cut -d "<" -f2 | cut -d " " -f1` | ||
value=`echo $p | grep -E "\<(.*?)\>(.*?)<(.*?)\>" | cut -d ">" -f2 | cut -d "<" -f1` | ||
|
||
if [ -n "$name" ] | ||
then | ||
#echo "looking for " $name " in " $newfile " with old value " $value | ||
|
||
while read -r line ; do | ||
number=`echo $line | cut -d ':' -f1` | ||
if [[ $lineNumber -le $number ]] | ||
then | ||
newvalue=`echo $line | sed -e "s/^$number:[ \t]*//"` | ||
if [[ "$p" != "$newvalue" ]] | ||
then | ||
sed $number"s#$newvalue#$p#" $newfile > $newfile"_" | ||
mv $newfile"_" $newfile | ||
fi | ||
lineNumber=$number | ||
break | ||
fi | ||
done <<< "$(grep -n "$name " $newfile)" | ||
fi | ||
|
||
done < $oldfile | ||
fi | ||
done | ||
done | ||
|
||
chmod -R 777 $DATA_CONFIG_DIR | ||
|
||
mkdir -p /data/machinery/h264 | ||
chmod -R 777 /data/machinery/h264 | ||
|
||
########################################## | ||
# | ||
# Update configuration files for web | ||
# | ||
|
||
cp -R /var/www/web/storage /data/web/ | ||
chmod -R 777 /data/web/storage | ||
|
||
cp -R /var/www/web/config /data/web/ | ||
mv /data/web/app/config/kerberos.php /data/web/config/kerberos.php | ||
chmod 777 /data/web/config/kerberos.php | ||
|
||
cp -R /var/www/web/bootstrap /data/web/ | ||
chmod -R 777 /data/web/bootstrap/cache | ||
|
||
rm -rf /data/web/app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.