This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
exec python3 /opt/ces-controller/current/controller.py "$@"
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
if [ "$#" -ne 1 ] || [ -z "$1" ]; then
|
||||
echo "usage: $0 GIT_COMMIT" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
commit=$1
|
||||
root=/opt/ces-controller
|
||||
release="$root/releases/$commit"
|
||||
temporary_link="$root/.current.$$"
|
||||
|
||||
install -d -m 700 "$root" "$root/releases" "$release"
|
||||
install -m 700 controller.py "$release/controller.py"
|
||||
install -m 600 README.md "$release/README.md"
|
||||
printf '%s\n' "$commit" > "$release/VERSION"
|
||||
chmod 600 "$release/VERSION"
|
||||
|
||||
ln -s "$release" "$temporary_link"
|
||||
mv -Tf "$temporary_link" "$root/current"
|
||||
install -m 755 scripts/ces-controller /usr/local/bin/ces-controller
|
||||
|
||||
echo "deployed_controller=$commit"
|
||||
Reference in New Issue
Block a user