From 014b8368a070468a96b08f847c1278e856a8c3ce Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Mon, 25 Mar 2024 14:06:30 -0500 Subject: Avoid taking STAGING_DIR from environment The staging directory is deleted in certain cases, taking it from the environment is accident prone. --- src/slack-autoupdate | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/slack-autoupdate b/src/slack-autoupdate index 4305c40..01941f6 100644 --- a/src/slack-autoupdate +++ b/src/slack-autoupdate @@ -17,19 +17,19 @@ NOTIFY="${NOTIFY:-no}" # Reboot after this period for install after a successful update. # # Set to empty to disable reboot or 'now' to reboot immediately. -export REBOOT_TIME="${REBOOT_TIME:-""}" +REBOOT_TIME="${REBOOT_TIME:-""}" # Packages are copied here on successful download. -export PACKAGE_DIR="${PACKAGE_DIR:-/var/spool/slack-autoupdate}" +PACKAGE_DIR="${PACKAGE_DIR:-/var/spool/slack-autoupdate}" # Packages are temperarily stored here until success. -export STAGING_DIR="${STAGING_DIR:-/var/cache/slack-autoupdate/staging}" +STAGING_DIR="/var/cache/slack-autoupdate/staging" # Information of interest to the admin on success. -export UPDATE_INFO="${UPDATE_INFO:-$STAGING_DIR/info.txt}" +UPDATE_INFO="$STAGING_DIR/info.txt" # Information of interest to the admin on failure. -export UPDATE_ERROR="${UPDATE_ERROR:-$STAGING_DIR/error.txt}" +UPDATE_ERROR="$STAGING_DIR/error.txt" # Avoid concurrently running with another instance. if [ "$(ls /var/lock/autoupdate.* 2>/dev/null)" ]; then -- cgit v1.2.3