-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from IGEL-Community:Zoho-Assist
Zoho Assist
- Loading branch information
Showing
5 changed files
with
237 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Zoho Assist (9 September) | ||
|
||
----- | ||
|
||
**NOTE:** Builder works for OS11.09+ (build with Ubuntu 22.04 - jammy) and OS12 (build with Ubuntu 20.04 - focal) | ||
|
||
----- | ||
|
||
| CP Information | | | ||
|-----------------|------------| | ||
| Package | [Zoho Assist](https://www.zoho.com/assist) | ||
| Script Name | [zohoassist-cp-init-script.sh](build/zohoassist-cp-init-script.sh) | | ||
| Packaging Notes | Details can be found in the build script | | ||
| Package automation | [build-zohoassist-cp.sh](build/build-zohoassist-cp.sh) | | ||
|
||
----- | ||
|
||
**NOTE:** | ||
|
||
- The Deb file has a postinst script, this is copied into the CP and run as final desktop command. Look at this file if something is missing or need to adjust something. | ||
|
||
`/custom/zohoassist/usr/local/ZohoAssist/igel_postinst.sh` |
123 changes: 123 additions & 0 deletions
123
CP_Source/Apps/Zoho_Assist/build/build-zohoassist-cp.sh
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,123 @@ | ||
#!/bin/bash | ||
#set -x | ||
#trap read debug | ||
|
||
# Creating an IGELOS CP | ||
## Development machine Ubuntu (OS11.09+ = 22.04; OS12 = 20.04) | ||
CP="zohoassist" | ||
ZIP_LOC="https://github.com/IGEL-Community/IGEL-Custom-Partitions/raw/master/CP_Packages/Apps" | ||
ZIP_FILE="Zoho_Assist" | ||
FIX_MIME="FALSE" | ||
CLEAN="FALSE" | ||
OS11_CLEAN="11.09.150" | ||
OS12_CLEAN="12.4.2" | ||
USERHOME_FOLDERS="FALSE" | ||
USERHOME_FOLDERS_DIRS="" | ||
APPARMOR="FALSE" | ||
GETVERSION_FILE="${HOME}/Downloads/zohoassist_*.deb" | ||
MISSING_LIBS_OS11="" | ||
MISSING_LIBS_OS12="" | ||
|
||
VERSION_ID=$(grep "^VERSION_ID" /etc/os-release | cut -d "\"" -f 2) | ||
|
||
if [ "${VERSION_ID}" = "18.04" ]; then | ||
MISSING_LIBS="${MISSING_LIBS_OS11}" | ||
IGELOS_ID="OS11" | ||
elif [ "${VERSION_ID}" = "22.04" ]; then | ||
MISSING_LIBS="${MISSING_LIBS_OS11}" | ||
IGELOS_ID="OS11" | ||
elif [ "${VERSION_ID}" = "20.04" ]; then | ||
MISSING_LIBS="${MISSING_LIBS_OS12}" | ||
IGELOS_ID="OS12" | ||
else | ||
echo "Not a valid Ubuntu OS release. OS11.09+ needs 22.04 (jammy) and OS12 needs 20.04 (focal)." | ||
exit 1 | ||
fi | ||
|
||
if ! compgen -G "${GETVERSION_FILE}" > /dev/null; then | ||
echo "***********" | ||
echo "Obtain your instance of Zoho Assist ${GETVERSION_FILE} for Linux (Linux version) 64bit, save into $HOME/Downloads and re-run this script " | ||
echo "***********" | ||
exit 1 | ||
fi | ||
|
||
mkdir build_tar | ||
cd build_tar | ||
|
||
for lib in $MISSING_LIBS; do | ||
apt-get download $lib | ||
done | ||
|
||
mkdir -p custom/${CP} | ||
|
||
# start extract | ||
dpkg -x "${GETVERSION_FILE}" custom/${CP} | ||
# end extract | ||
|
||
find . -name "*.deb" | while read LINE | ||
do | ||
dpkg -x "${LINE}" custom/${CP} | ||
done | ||
|
||
if [ "${FIX_MIME}" = "TRUE" ]; then | ||
mv custom/${CP}/usr/share/applications/ custom/${CP}/usr/share/applications.mime | ||
fi | ||
|
||
if [ "${USERHOME_FOLDERS}" = "TRUE" ]; then | ||
for folder in $USERHOME_FOLDERS_DIRS; do | ||
mkdir -p $folder | ||
done | ||
fi | ||
|
||
if [ "${CLEAN}" = "TRUE" ]; then | ||
echo "+++++++======= STARTING CLEAN of USR =======+++++++" | ||
wget https://raw.githubusercontent.com/IGEL-Community/IGEL-Custom-Partitions/master/utils/igelos_usr/clean_cp_usr_lib.sh | ||
chmod a+x clean_cp_usr_lib.sh | ||
wget https://raw.githubusercontent.com/IGEL-Community/IGEL-Custom-Partitions/master/utils/igelos_usr/clean_cp_usr_share.sh | ||
chmod a+x clean_cp_usr_share.sh | ||
if [ "${IGELOS_ID}" = "OS11" ]; then | ||
./clean_cp_usr_lib.sh ${OS11_CLEAN}_usr_lib.txt custom/${CP}/usr/lib | ||
./clean_cp_usr_share.sh ${OS11_CLEAN}_usr_share.txt custom/${CP}/usr/share | ||
else | ||
./clean_cp_usr_lib.sh ${OS12_CLEAN}_usr_lib.txt custom/${CP}/usr/lib | ||
./clean_cp_usr_share.sh ${OS12_CLEAN}_usr_share.txt custom/${CP}/usr/share | ||
fi | ||
echo "+++++++======= DONE CLEAN of USR =======+++++++" | ||
fi | ||
|
||
wget ${ZIP_LOC}/${ZIP_FILE}.zip | ||
|
||
unzip ${ZIP_FILE}.zip -d custom | ||
|
||
if [ "${APPARMOR}" = "TRUE" ]; then | ||
mkdir -p custom/${CP}/config/bin | ||
mkdir -p custom/${CP}/lib/systemd/system | ||
mv custom/target/build/${CP}_cp_apparmor_reload custom/${CP}/config/bin | ||
mv custom/target/build/igel-${CP}-cp-apparmor-reload.service custom/${CP}/lib/systemd/system/ | ||
fi | ||
mv custom/target/build/${CP}-cp-init-script.sh custom | ||
|
||
cd custom | ||
|
||
# edit inf file for version number | ||
mkdir getversion | ||
cd getversion | ||
ar -x "${GETVERSION_FILE}" | ||
tar xf control.tar* ./control ./postinst | ||
VERSION=$(grep Version control | cut -d " " -f 2) | ||
# copy postinst to CP | ||
mv postinst ../${CP}/usr/local/ZohoAssist/igel_postinst.sh | ||
#echo "Version is: " ${VERSION} | ||
cd .. | ||
sed -i "/^version=/c version=\"${VERSION}\"" target/${CP}.inf | ||
#echo "${CP}.inf file is:" | ||
#cat target/${CP}.inf | ||
|
||
# new build process into zip file | ||
tar cvjf target/${CP}.tar.bz2 ${CP} ${CP}-cp-init-script.sh | ||
zip -g ../${ZIP_FILE}.zip target/${CP}.tar.bz2 target/${CP}.inf | ||
zip -d ../${ZIP_FILE}.zip "target/build/*" "target/igel/*" "target/target/*" | ||
mv ../${ZIP_FILE}.zip ../../${ZIP_FILE}-${VERSION}_${IGELOS_ID}_igel01.zip | ||
|
||
cd ../.. | ||
rm -rf build_tar |
49 changes: 49 additions & 0 deletions
49
CP_Source/Apps/Zoho_Assist/build/zohoassist-cp-init-script.sh
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,49 @@ | ||
#! /bin/bash | ||
#set -x | ||
#trap read debug | ||
|
||
ACTION="custompart-zohoassist_${1}" | ||
|
||
# mount point path | ||
MP=$(get custom_partition.mountpoint) | ||
|
||
# custom partition path | ||
CP="${MP}/zohoassist" | ||
|
||
# output to systemlog with ID amd tag | ||
LOGGER="logger -it ${ACTION}" | ||
|
||
echo "Starting" | $LOGGER | ||
|
||
case "$1" in | ||
init) | ||
# Initial permissions | ||
chown -R root:root "${CP}" | $LOGGER | ||
# Linking files and folders on proper path | ||
find ${CP} -printf "/%P\n" | while read DEST | ||
do | ||
if [ ! -z "${DEST}" -a ! -e "${DEST}" ]; then | ||
# Remove the last slash, if it is a dir | ||
[ -d $DEST ] && DEST=${DEST%/} | $LOGGER | ||
if [ ! -z "${DEST}" ]; then | ||
ln -sv "${CP}/${DEST}" "${DEST}" | $LOGGER | ||
fi | ||
fi | ||
done | ||
|
||
;; | ||
stop) | ||
# Unlinking files and folders on proper path | ||
find ${CP} -printf "/%P\n" | while read DEST | ||
do | ||
if [ -L "${DEST}" ]; then | ||
unlink $DEST | $LOGGER | ||
fi | ||
done | ||
|
||
;; | ||
esac | ||
|
||
echo "Finished" | $LOGGER | ||
|
||
exit 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<profiles> | ||
<profile> | ||
<profile_id>10688</profile_id> | ||
<profilename>Zoho Assist CP</profilename> | ||
<firmware> | ||
<model>IGEL OS 11</model> | ||
<version>11.09.150.01</version> | ||
</firmware> | ||
<description>Zoho Assist</description> | ||
<overwritesessions>false</overwritesessions> | ||
<is_master_profile>false</is_master_profile> | ||
<is_igel_os>true</is_igel_os> | ||
<settings> | ||
<pclass name="custom_partition.enabled"> | ||
<pvalue instancenr="-1" variableExpression="" variableSubstitutionActive="false">true</pvalue> | ||
<variableSubstitutionActive>false</variableSubstitutionActive> | ||
</pclass> | ||
<pclass name="custom_partition.size"> | ||
<pvalue instancenr="-1" variableExpression="" variableSubstitutionActive="false">100M</pvalue> | ||
<variableSubstitutionActive>false</variableSubstitutionActive> | ||
</pclass> | ||
</settings> | ||
<instancesettings> | ||
<instance classprefix="custom_partition.source%" serialnumber="31cea061:1730aeba537:-7fff127.0.1.1"> | ||
<ivalue classname="custom_partition.source%.username" variableExpression="" variableSubstitutionActive="false">[USERNAME]</ivalue> | ||
<ivalue classname="custom_partition.source%.url" variableExpression="" variableSubstitutionActive="false">https://[UMSSERVER]:8443/ums_filetransfer/zohoassist.inf</ivalue> | ||
<ivalue classname="custom_partition.source%.password" variableExpression="" variableSubstitutionActive="false"></ivalue> | ||
<ivalue classname="custom_partition.source%.init_action" variableExpression="" variableSubstitutionActive="false">/custom/zohoassist-cp-init-script.sh init</ivalue> | ||
<ivalue classname="custom_partition.source%.final_action" variableExpression="" variableSubstitutionActive="false">/custom/zohoassist-cp-init-script.sh stop</ivalue> | ||
<ivalue classname="custom_partition.source%.crypt_password" variableExpression="" variableSubstitutionActive="false"></ivalue> | ||
<ivalue classname="custom_partition.source%.autoupdate" variableExpression="" variableSubstitutionActive="false">true</ivalue> | ||
</instance> | ||
</instancesettings> | ||
</profile> | ||
</profiles> |
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,7 @@ | ||
[INFO] | ||
[PART] | ||
file="zohoassist.tar.bz2" | ||
version="X.X.X" | ||
size="100M" | ||
name="zohoassist" | ||
minfw="11.09.150" |