FIX rm if file does not exist
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-24 21:41:18 +00:00
parent e6ab94915e
commit 8014efd231

View File

@@ -37,7 +37,7 @@ else
exit 1
fi
echo "Starting as a cluster"
rm /etc/ctdb/ctdbd.conf
rm -f /etc/ctdb/ctdbd.conf
# For CTDB variables see https://manpages.debian.org/unstable/ctdb/ctdbd.conf.5.en.html
export CTDB_ENABLED=true
echo 'CTDB_NODES=!/resolveNodes.sh '"$CLUSTER_NODE_NAMES" >> /etc/ctdb/ctdbd.conf
@@ -128,6 +128,7 @@ if [ -z "$REAL_REALM" ]; then
if [ "$CTDB_ENABLED" = "true" ]; then
((/usr/sbin/ctdbd --interactive)&)
CTDB_PID=$!
sleep 10
fi
net ads join --no-dns-updates -U"$ADMIN_ACCOUNT"%"$ADMIN_PASSWORD"
if [ "$CTDB_ENABLED" = "true" ]; then
@@ -173,16 +174,12 @@ pipe_owner="root:samba-exporter"
request_pipe_file="/run/samba_exporter.request.pipe"
response_pipe_file="/run/samba_exporter.response.pipe"
if [ -p "$request_pipe_file" ]; then
rm "$request_pipe_file"
fi
rm -f "$request_pipe_file"
mkfifo "$request_pipe_file"
chown "$pipe_owner" "$request_pipe_file"
chmod "$pipe_permissions" "$request_pipe_file"
if [ -p "$response_pipe_file" ]; then
rm "$response_pipe_file"
fi
rm -f "$response_pipe_file"
mkfifo "$response_pipe_file"
chown "$pipe_owner" "$response_pipe_file"
chmod "$pipe_permissions" "$response_pipe_file"