#!/bin/bash

source debian/vars.sh

mkdir -p $DEB_INSTALL_ROOT/opt/cpanel/ea-memcached16
cp $SOURCE1 $DEB_INSTALL_ROOT/opt/cpanel/ea-memcached16/README.md
echo -n "$version-$release_prefix" > $DEB_INSTALL_ROOT/opt/cpanel/ea-memcached16/pkg-version
cat << EOF > $DEB_INSTALL_ROOT/opt/cpanel/ea-memcached16/ea-podman.json
{
    "ports" : [],
    "image" : "docker.io/library/memcached:$version",
    "startup" : {
        "--user" : [ "root" ],
        "-v"     : [ ":/socket_dir" ],
        "--entrypoint" : [ "[\"/entrypoint.sh\",\"-u\",\"root\",\"-s\",\"/socket_dir/memcached.sock\"]" ]
    }
}
EOF
