Skip to main content
Skip table of contents

Creating the Initialization Script

In this step, you will create an initialization script that enables the application to work inside a Custom Partition. In a regular installation, the files of the Teams application would be located in /usr, whereas in the Custom Partition, they are located under /custom/teams/usr. The initialization script will fix this by creating symbolic links so that for example /custom/teams/usr/share/libffmpeg.so will appear to be in /usr/share/libffmpeg.so, where Teams expects it.

  1. On your workstation, go to the directory where the teams directory is located.

  2. Open your text editor of choice and enter the following script:

    BASH
    #!/bin/sh
    
    ACTION="custompart-teams_${1}"
    
    # mount point path
    MP=$(get custom_partition.mountpoint)
    
    # custom partition path
    CP="${MP}/teams"
    
    # only needed if application has an executable
    BIN="/usr/bin/teams"
    
    # output to systemlog with ID amd tag
    LOGGER="logger -it ${ACTION}"
    
    echo "Starting" | $LOGGER
    
    case "$1" in
    init)
            # Linking files and folders on proper path
    	find ${CP} | while read LINE
            do
                    DEST=$(echo -n "${LINE}" | sed -e "s|${CP}||g")
                    if [ ! -z "${DEST}" -a ! -e "${DEST}" ]; then
                            # Remove the last slash, if it is a dir
                            [ -d $LINE ] && DEST=$(echo "${DEST}" | sed -e "s/\/$//g") | $LOGGER
                            if [ ! -z "${DEST}" ]; then
                                    ln -sv "${LINE}" "${DEST}" | $LOGGER
                            fi
                    fi
            done
    ;;
    stop)
            # unlink linked files
    	    find ${CP} | while read LINE
                do
                    DEST=$(echo -n "${LINE}" | sed -e "s|${CP}||g")
    		    unlink $DEST | $LOGGER
    	    done
    ;;
    esac
    
    echo "Finished" | $LOGGER
    
    exit 0
    

  1. Save the file as custompart-teams

Next Step

>> Compressing the Custom Partition Contents 1

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.