# If there's a config file in /var/www identical to the one in /etc,
# overwrite it with a symlink after porting its permissions.
elif cmp --quiet "$release_conffile" "$etc_conffile"; then
- local ownership="$(stat -c "%U:%G" "$release_conffile")"
+ local ownership="$(stat -c "%u:%g" "$release_conffile")"
+ local owning_group="${ownership#*:}"
+ if [ 0 != "$owning_group" ]; then
+ chgrp "$owning_group" "$CONFIG_PATH" /etc/arvados
+ fi
chown "$ownership" "$etc_conffile"
chmod --reference="$release_conffile" "$etc_conffile"
- chgrp "${ownership#*:}" "$CONFIG_PATH" /etc/arvados
- chmod g+rx "$CONFIG_PATH" /etc/arvados
ln --force -s "$etc_conffile" "$release_conffile"
fi
fi
fi
chown -R "$WWW_OWNER:" $RELEASE_PATH/tmp
+ setup_before_nginx_restart
+
if [ ! -z "$WEB_SERVICE" ]; then
service "$WEB_SERVICE" restart
fi