aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-03-25 14:06:30 -0500
committerSlack Coder <slackcoder@server.ky>2024-03-25 14:08:26 -0500
commit014b8368a070468a96b08f847c1278e856a8c3ce (patch)
tree04b21e149f4a5a1dfbd01eb526b7637ef0d9ff5e
parent8e27eca9884229469b7576e195cfb2185697e62c (diff)
downloadslack-autoupdate-014b8368a070468a96b08f847c1278e856a8c3ce.tar.xz
Avoid taking STAGING_DIR from environment
The staging directory is deleted in certain cases, taking it from the environment is accident prone.
-rw-r--r--src/slack-autoupdate10
1 files changed, 5 insertions, 5 deletions
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