Skip to content

Commit

Permalink
AWS WorkSpaces (20 December)
Browse files Browse the repository at this point in the history
  • Loading branch information
rneher-igel committed Dec 21, 2023
1 parent d2a016c commit 7412003
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ init)
sleep 3
fi

${MP}/igel_awsws_postinst.sh configure
${MP}/awsws_igel_postinst.sh configure

;;
stop)
Expand Down
2 changes: 1 addition & 1 deletion CP_Source/Apps/Amazon_WorkSpaces/build/build-awsws-cp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CLEAN="FALSE"
OS11_CLEAN="11.09.150"
OS12_CLEAN="12.2.2"
USERHOME_FOLDERS="TRUE"
USERHOME_FOLDERS_DIRS="custom/aws/userhome/.config/WorkSpaces"
USERHOME_FOLDERS_DIRS="custom/${CP}/userhome/.local/share/workspacesclient"
APPARMOR="FALSE"
#https://d3nt0h4h6pmmc4.cloudfront.net/new_workspacesclient_jammy_amd64.deb
GETVERSION_FILE_OS11="new_workspacesclient_jammy_amd64.deb"
Expand Down
36 changes: 36 additions & 0 deletions CP_Source/Apps/Amazon_WorkSpaces/igel/awsws-profile_OS1109.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,42 @@
<pvalue instancenr="-1" variableExpression="" variableSubstitutionActive="false">true</pvalue>
<variableSubstitutionActive>false</variableSubstitutionActive>
</pclass>
<pclass name="userinterface.rccustom.custom_cmd_x11_final">
<pvalue instancenr="-1" variableExpression="" variableSubstitutionActive="false">cat &amp;lt&amp;lt 'EOF' &amp;gt /tmp/rsync-awsws-config.sh
#!/bin/sh
#set -x
#trap read debug

# Assumption - This command is ONLY run at boot time!!!

AWSws="/userhome/.local/share"
AWSws_CONNECTION="${AWSws}/workspacesclient/hsts-storage.sqlite"
AWSws_BACKUP="/custom/awsws/userhome/.local/AWSwsClient-backup"
AWSws_BACKUP_CONNECTION="${AWSws_BACKUP}/workspacesclient/hsts-storage.sqlite"

# On boot up - copy if it exists
if &amp;lb -e ${AWSws_BACKUP_CONNECTION} &amp;rb; then
mkdir -p ${AWSws}
rsync -Pav ${AWSws_BACKUP}/ ${AWSws}
chown -R user:users ${AWSws}
fi

if &amp;lb ! -d ${AWSws_BACKUP} &amp;rb; then
mkdir -p ${AWSws_BACKUP}
fi

while true
do
sleep 5
if &amp;lb -e ${AWSws_CONNECTION} &amp;rb; then
rsync --delete -Pav ${AWSws}/ ${AWSws_BACKUP}
fi
done
EOF
chmod 700 /tmp/rsync-awsws-config.sh
/tmp/rsync-awsws-config.sh &amp;amp</pvalue>
<variableSubstitutionActive>false</variableSubstitutionActive>
</pclass>
<pclass name="custom_partition.size">
<pvalue instancenr="-1" variableExpression="" variableSubstitutionActive="false">400M</pvalue>
<variableSubstitutionActive>false</variableSubstitutionActive>
Expand Down

0 comments on commit 7412003

Please sign in to comment.