From: Petr Baudis Date: Wed, 7 Mar 2012 11:31:02 +0000 (+0100) Subject: install: mkfifo only if the file is not fifo yet X-Git-Url: https://repo.or.cz/w/girocco.git/commitdiff_plain/678aa65431b71418d55289da549e4756b3373750 install: mkfifo only if the file is not fifo yet This avoids the need to re-chown file after each install. --- diff --git a/install.sh b/install.sh index 63d4b1c..c8ad84b 100755 --- a/install.sh +++ b/install.sh @@ -35,7 +35,7 @@ if [ -n "$cfg_mirror" ]; then fi if [ -n "$cfg_push" -a "$cfg_permission_control" = "Group" ]; then echo "Creating FIFO for fixupd: $cfg_fixup_queue" - mkfifo "$cfg_fixup_queue" + [ -p "$cfg_fixup_queue" ] || mkfifo "$cfg_fixup_queue" chown "$cfg_cgi_user""$owngroup" "$cfg_fixup_queue" || echo "WARNING: Cannot chown $cfg_cgi_user.$cfg_owning_group $cfg_fixup_queue" echo "--- Remember to copy $cfg_basedir/fixupd/ to /root and start fixupd.sh as root"