Skip to content

Commit 9f3c8fb

Browse files
committed
ampstart(fix): remove unneeded chowns
1 parent d254bc4 commit 9f3c8fb

3 files changed

Lines changed: 3 additions & 45 deletions

File tree

scripts/apps/redis/ampstart.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ getent group tty >/dev/null && usermod -aG tty amp
4545

4646
install -d -m 0755 /home/amp
4747
touch /home/amp/.gitconfig
48-
chown -R amp:amp /home/amp
48+
chown amp:amp /home/amp /home/amp/.gitconfig
4949

5050
# Make AMP binary executable
5151
AMP_BIN="/AMP/AMP_Linux_${ARCH}"
@@ -71,20 +71,6 @@ if ((${#REQUIRED_DEPS[@]})); then
7171
)
7272
fi
7373

74-
# Set custom mountpoint permissions if needed (non-fatal)
75-
if [[ -n "${AMP_MOUNTPOINTS:-}" ]]; then
76-
echo "[Info] Updating custom mountpoint permissions..."
77-
IFS=':' read -r -a dirs <<< "${AMP_MOUNTPOINTS}"
78-
for dir in "${dirs[@]}"; do
79-
[[ -n "${dir}" ]] || continue
80-
if [[ -e "${dir}" ]]; then
81-
chown -R amp:amp "${dir}" 2>/dev/null || echo "[Warn] chown failed for ${dir}; continuing"
82-
else
83-
echo "[Warn] Mountpoint not found: ${dir}; skipping"
84-
fi
85-
done
86-
fi
87-
8874
# Run custom start script if it exists (non-fatal)
8975
if [[ -f "/AMP/customstart.sh" ]]; then
9076
echo "[Info] Running customstart.sh..."

scripts/apps/uptime-kuma-2/ampstart.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ getent group tty >/dev/null && usermod -aG tty amp
4545

4646
install -d -m 0755 /home/amp
4747
touch /home/amp/.gitconfig
48-
chown -R amp:amp /home/amp
48+
chown amp:amp /home/amp /home/amp/.gitconfig
4949

5050
# Make AMP binary executable
5151
AMP_BIN="/AMP/AMP_Linux_${ARCH}"
@@ -71,20 +71,6 @@ if ((${#REQUIRED_DEPS[@]})); then
7171
)
7272
fi
7373

74-
# Set custom mountpoint permissions if needed (non-fatal)
75-
if [[ -n "${AMP_MOUNTPOINTS:-}" ]]; then
76-
echo "[Info] Updating custom mountpoint permissions..."
77-
IFS=':' read -r -a dirs <<< "${AMP_MOUNTPOINTS}"
78-
for dir in "${dirs[@]}"; do
79-
[[ -n "${dir}" ]] || continue
80-
if [[ -e "${dir}" ]]; then
81-
chown -R amp:amp "${dir}" 2>/dev/null || echo "[Warn] chown failed for ${dir}; continuing"
82-
else
83-
echo "[Warn] Mountpoint not found: ${dir}; skipping"
84-
fi
85-
done
86-
fi
87-
8874
# Run custom start script if it exists (non-fatal)
8975
if [[ -f "/AMP/customstart.sh" ]]; then
9076
echo "[Info] Running customstart.sh..."

scripts/base/ampstart.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ getent group tty >/dev/null && usermod -aG tty amp
4545

4646
install -d -m 0755 /home/amp
4747
touch /home/amp/.gitconfig
48-
chown -R amp:amp /home/amp
48+
chown amp:amp /home/amp /home/amp/.gitconfig
4949

5050
# Make AMP binary executable
5151
AMP_BIN="/AMP/AMP_Linux_${ARCH}"
@@ -71,20 +71,6 @@ if ((${#REQUIRED_DEPS[@]})); then
7171
)
7272
fi
7373

74-
# Set custom mountpoint permissions if needed (non-fatal)
75-
if [[ -n "${AMP_MOUNTPOINTS:-}" ]]; then
76-
echo "[Info] Updating custom mountpoint permissions..."
77-
IFS=':' read -r -a dirs <<< "${AMP_MOUNTPOINTS}"
78-
for dir in "${dirs[@]}"; do
79-
[[ -n "${dir}" ]] || continue
80-
if [[ -e "${dir}" ]]; then
81-
chown -R amp:amp "${dir}" 2>/dev/null || echo "[Warn] chown failed for ${dir}; continuing"
82-
else
83-
echo "[Warn] Mountpoint not found: ${dir}; skipping"
84-
fi
85-
done
86-
fi
87-
8874
# Run custom start script if it exists (non-fatal)
8975
if [[ -f "/AMP/customstart.sh" ]]; then
9076
echo "[Info] Running customstart.sh..."

0 commit comments

Comments
 (0)