From 7bd7f0ded9f1307c207ce709c17e485bfcbec04c Mon Sep 17 00:00:00 2001 From: Bozhidar Slaveykov Date: Sat, 25 Nov 2023 14:31:09 +0200 Subject: [PATCH] update --- compilators/debian/nginx/nginx-compile.sh | 2 ++ compilators/debian/nginx/postinst | 11 +++++++++++ compilators/debian/nginx/postrm | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 compilators/debian/nginx/postinst create mode 100644 compilators/debian/nginx/postrm diff --git a/compilators/debian/nginx/nginx-compile.sh b/compilators/debian/nginx/nginx-compile.sh index 7763453..ece7cb5 100644 --- a/compilators/debian/nginx/nginx-compile.sh +++ b/compilators/debian/nginx/nginx-compile.sh @@ -32,6 +32,8 @@ sudo mv $PACKAGE_MAIN_DIR/usr/local/alphax/nginx/sbin/nginx $PACKAGE_MAIN_DIR/us # Copy debian package META file sudo cp $MAIN_DIR/control $PACKAGE_MAIN_DIR/DEBIAN +sudo cp $MAIN_DIR/postinst $PACKAGE_MAIN_DIR/DEBIAN +sudo cp $MAIN_DIR/postrm $PACKAGE_MAIN_DIR/DEBIAN # Copy ALPHAX series files sudo cp $MAIN_DIR/alphax $PACKAGE_MAIN_DIR/etc/init.d/alphax diff --git a/compilators/debian/nginx/postinst b/compilators/debian/nginx/postinst new file mode 100644 index 0000000..7b35ddd --- /dev/null +++ b/compilators/debian/nginx/postinst @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +if [ "$1" != "configure" ]; then + exit 0 +fi + +# Touch and set permisions on default log files on installation +update-rc.d alphax defaults > /dev/null +invoke-rc.d alphax start || true diff --git a/compilators/debian/nginx/postrm b/compilators/debian/nginx/postrm new file mode 100644 index 0000000..d1fb519 --- /dev/null +++ b/compilators/debian/nginx/postrm @@ -0,0 +1,5 @@ +#!/bin/sh + +update-rc.d alphax remove > /dev/null 2>&1 + +exit 0